Bug 62360 - Web Inspector: [Chromium] Detailed heap snapshots window becomes unresponsive if several long-running operations being requested
Summary: Web Inspector: [Chromium] Detailed heap snapshots window becomes unresponsive...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Mikhail Naganov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-09 00:39 PDT by Mikhail Naganov
Modified: 2011-06-15 23:26 PDT (History)
12 users (show)

See Also:


Attachments
patch (17.82 KB, patch)
2011-06-15 02:51 PDT, Mikhail Naganov
pfeldman: review+
mnaganov: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cr-linux-03 (1.39 MB, application/zip)
2011-06-15 08:27 PDT, WebKit Review Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Naganov 2011-06-09 00:39:37 PDT
Consider the following scenario:
 - in the Dominators view, I have revealed all of the nodes;
 - now I'm clicking actively on column headers;
 - result: visually nothing happens, worker is overloaded, user confused;
 - only after some significant time (after worker has finished processing), the picture changes.

It should make sense to divide operations in batches, so worker can provide feedback and interrupt them if needed (e.g. if I'm changing sorting order before the worker has finished with sorting, it's better to interrupt the current sorting and start the new one).
Comment 1 Mikhail Naganov 2011-06-15 02:51:53 PDT
Created attachment 97264 [details]
patch
Comment 2 Pavel Feldman 2011-06-15 04:52:30 PDT
Comment on attachment 97264 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=97264&action=review

> Source/WebCore/inspector/front-end/PartialQuickSort.js:31
> +function swap(array, i1, i2)

You should move these into the closure within defineProperty.
Comment 3 WebKit Review Bot 2011-06-15 08:27:31 PDT
Comment on attachment 97264 [details]
patch

Attachment 97264 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/8866095

New failing tests:
inspector/profiler/detailed-heapshots-dominators-expansion-preserved-when-sorting.html
inspector/profiler/detailed-heapshots-containment-expansion-preserved-when-sorting.html
inspector/profiler/detailed-heapshots-summary-expansion-preserved-when-sorting.html
inspector/profiler/detailed-heapshots-comparison-expansion-preserved-when-sorting.html
Comment 4 WebKit Review Bot 2011-06-15 08:27:36 PDT
Created attachment 97299 [details]
Archive of layout-test-results from ec2-cr-linux-03

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-03  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 5 Mikhail Naganov 2011-06-15 23:26:01 PDT
Variation of the patch landed: http://trac.webkit.org/changeset/89008
Small errors causing tests failures were fixed. A new test was added.


2011-06-15  Mikhail Naganov  <mnaganov@chromium.org>

        Reviewed by Pavel Feldman.

        WebInspector [Chromium]: Make heap snapshots UI more responsive.
        https://bugs.webkit.org/show_bug.cgi?id=62360

        Two changes have been made:
          - when we request elements, sort array only partially;
          - when populating children, do it in batches;

        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * inspector/front-end/DetailedHeapshotGridNodes.js:
        (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.callSerialize):
        (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved):
        (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
        * inspector/front-end/HeapSnapshot.js:
        (WebInspector.HeapSnapshotFilteredOrderedIterator):
        (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeNextItems):
        (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.sortAndRewind):
        (WebInspector.HeapSnapshotEdgesProvider.prototype.sort):
        (WebInspector.HeapSnapshotNodesProvider.prototype.sort):
        * inspector/front-end/HeapSnapshotWorker.js:
        * inspector/front-end/PartialQuickSort.js: Added.
        * inspector/front-end/WebKit.qrc:
        * inspector/front-end/inspector.html:

2011-06-15  Mikhail Naganov  <mnaganov@chromium.org>

        Reviewed by Pavel Feldman.

        WebInspector [Chromium]: Make heap snapshots UI more responsive.
        https://bugs.webkit.org/show_bug.cgi?id=62360

        Two changes have been made:
          - when we request elements, sort array only partially;
          - when populating children, do it in batches;

        * WebKit.gyp:

2011-06-15  Mikhail Naganov  <mnaganov@chromium.org>

        Reviewed by Pavel Feldman.

        WebInspector [Chromium]: Make heap snapshots UI more responsive.
        https://bugs.webkit.org/show_bug.cgi?id=62360

        Two changes have been made:
          - when we request elements, sort array only partially;
          - when populating children, do it in batches;

        * inspector/profiler/heap-snapshot.html:
        * inspector/utilities.html: