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.
Nice idea. Would this cause any problems with searching on the Resources tab?
(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.
Created attachment 47720 [details] [PATCH] Proposed solution
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.
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'.
Created attachment 47827 [details] [PATCH] A simplified solution
Comment on attachment 47827 [details] [PATCH] A simplified solution Clearing flags on attachment: 47827 Committed r54148: <http://trac.webkit.org/changeset/54148>
All reviewed patches have been landed. Closing bug.