RESOLVED FIXED 56111
Web Inspector: Optimize backend-frontend data transfer volume for CSS styles
https://bugs.webkit.org/show_bug.cgi?id=56111
Summary Web Inspector: Optimize backend-frontend data transfer volume for CSS styles
Alexander Pavlov (apavlov)
Reported 2011-03-10 09:37:16 PST
Currently every CSS property is described by a number of key:value pairs in the Web Inspector protocol. This results in computed style transfers of about 30kB for ~220 properties and should certainly be reworked (this is often slow even without remote debugging).
Attachments
[PATCH] Suggested solution (8.33 KB, patch)
2011-03-10 10:58 PST, Alexander Pavlov (apavlov)
pfeldman: review+
Alexander Pavlov (apavlov)
Comment 1 2011-03-10 10:58:50 PST
Created attachment 85350 [details] [PATCH] Suggested solution
Patrick Mueller
Comment 2 2011-03-10 13:43:04 PST
Makes sense. I'm curious how much this saves. I've been noticing for weinre that computed styles are coming over far too often, as near as I can tell. For instance, I see them come over even if the computed style disclosure is set to "hide". Might well be something I'm doing wrong, or something that's changed since I last caught up to WI, of maybe they need to come over anyway for some other calculation.
Pavel Feldman
Comment 3 2011-03-10 13:52:07 PST
(In reply to comment #2) > Makes sense. I'm curious how much this saves. > > I've been noticing for weinre that computed styles are coming over far too often, as near as I can tell. For instance, I see them come over even if the computed style disclosure is set to "hide". Might well be something I'm doing wrong, or something that's changed since I last caught up to WI, of maybe they need to come over anyway for some other calculation. Good point - I think we are sending computed style information regardless of the sidebar section state.
Ilya Tikhonovsky
Comment 4 2011-03-11 11:54:22 PST
was landed as r80845
Ilya Tikhonovsky
Comment 5 2011-03-11 11:54:58 PST
was landed as r80845(In reply to comment #4) > was landed as r80845 wrong bug
Pavel Feldman
Comment 6 2011-03-14 02:39:36 PDT
Comment on attachment 85350 [details] [PATCH] Suggested solution View in context: https://bugs.webkit.org/attachment.cgi?id=85350&action=review > LayoutTests/inspector/styles/styles-new-API.html:244 > + InspectorTest.addResult("['" + property.name + "':'" + property.value + "'" + (property.priority === "important" ? " is-important" : "") + ((typeof property.parsedOk === "undefined") ? "" : " non-parsed") +"] @[" + property.startOffset + "-" + property.endOffset + "] " + (property.status || "style")); ("parsedOk" in property) > Source/WebCore/inspector/InspectorStyleSheet.cpp:453 > + String status = it->disabled ? "disabled" : "active"; I'd suggest that: - active properties have no additional flags, - disabled properties have "disabled" set to true, - style (longhand) properties are placed under source code (shorthand) properties in case of regular styles + computed styles are returned as arrays of longhands.
Alexander Pavlov (apavlov)
Comment 7 2011-03-14 05:54:29 PDT
Note You need to log in before you can comment on or make changes to this bug.