RESOLVED FIXED 34332
Web Inspector: Lazy-load resource contents in the Resources panel
https://bugs.webkit.org/show_bug.cgi?id=34332
Summary Web Inspector: Lazy-load resource contents in the Resources panel
Alexander Pavlov (apavlov)
Reported 2010-01-29 08:18:24 PST
Recently, the resource data pane in the Resources panel was split into 2 tabs, one with the resource metainfo, the other with the resource contents. However, when a resource is selected and its metainfo tab is displayed, the resource contents retrieval starts. Once the contents of a long textual resource are retrieved, their handling takes some time and hangs the UI. Instead, such resource contents should be loaded only when the Contents tab is selected.
Attachments
[PATCH] Proposed solution (9.65 KB, patch)
2010-01-29 10:13 PST, Alexander Pavlov (apavlov)
pfeldman: review-
timothy: commit-queue-
[PATCH] A simplified solution (2.16 KB, patch)
2010-02-01 03:14 PST, Alexander Pavlov (apavlov)
no flags
Joseph Pecoraro
Comment 1 2010-01-29 08:36:34 PST
Nice idea. Would this cause any problems with searching on the Resources tab?
Alexander Pavlov (apavlov)
Comment 2 2010-01-29 10:12:25 PST
(In reply to comment #1) > Nice idea. Would this cause any problems with searching on the Resources tab? Good catch - I forgot about externally opening resources in the Scripts and Resources panels. When the search is performed, all resource contents should be retrieved. Now the solution should be good to review.
Alexander Pavlov (apavlov)
Comment 3 2010-01-29 10:13:09 PST
Created attachment 47720 [details] [PATCH] Proposed solution
Timothy Hatcher
Comment 4 2010-01-29 17:52:38 PST
Comment on attachment 47720 [details] [PATCH] Proposed solution > + ensureResourceLoaded: function() ensureResourceIsLoaded would be a better name. > + if (resource._resourcesView && "setLazyLoad" in resource._resourcesView) > + resource._resourcesView.setLazyLoad(lazyLoad); Why not just set the property directly? When would the setLazyLoad function not exist? Use a setter instead of a function, or just set the property directly. Fix these before landing.
Pavel Feldman
Comment 5 2010-01-31 04:41:39 PST
Comment on attachment 47720 [details] [PATCH] Proposed solution It is not clear to me why these changes are necessary. Why not to simply remove setupSourceFrameIfNeeded from the SourceView::show and call it as an abstract function from within ResourceView upon tab switch? Patch also seems to be wrong in a way that it does not load resource if lazy load is set to 'false'.
Alexander Pavlov (apavlov)
Comment 6 2010-02-01 03:14:38 PST
Created attachment 47827 [details] [PATCH] A simplified solution
WebKit Commit Bot
Comment 7 2010-02-01 14:03:05 PST
Comment on attachment 47827 [details] [PATCH] A simplified solution Clearing flags on attachment: 47827 Committed r54148: <http://trac.webkit.org/changeset/54148>
WebKit Commit Bot
Comment 8 2010-02-01 14:03:13 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.