Bug 86804 - Web Inspector: CSS profiles don't include time spent in querySelector[All]
Summary: Web Inspector: CSS profiles don't include time spent in querySelector[All]
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-17 22:03 PDT by Adam Roben (:aroben)
Modified: 2014-02-05 11:07 PST (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2012-05-17 22:03:31 PDT
It looks like CSS profile data is only collected in WebCore::StyleResolver member functions. But StyleResolver isn't used for document.querySelector[All] and element.querySelector[All]. For that we need to instrument WebCore::SelectorDataList (I believe).

It would be great to include querySelector[All] time in CSS profiles.
Comment 1 Alexander Pavlov (apavlov) 2012-06-04 09:33:39 PDT
It looks like SelectorDataList (as well as SelectorQuery and SelectorChecker) operate CSSSelector's, and CSSRule instances, which we need to provide meaningful profile data, are not available there...

If you or anyone involved with this topic has an insight of how CSSRule's of interest could be accessed, your comments are most welcome.
Comment 2 Adam Roben (:aroben) 2014-02-05 08:08:04 PST
I'm not sure CSSRules are actually needed in this case.

StyleResolver::applyProperties calls InspectorInstrumentation::{will,did}ProcessRule so that the Inspector can attribute the time spent *to that rule*. But for querySelector[All], we don't want to attribute time to a rule; instead we want to attribute time spent to querySelector[All] itself, perhaps with a way to distinguish what actual selectors were passed to cause the time to be spent.

I think we'd need some new InspectorInstrumentation calls, something like:

void willQuerySelector[All](const AtomicString& selectors);
void didQuerySelector[All](const InspectorInstrumentationCookie&);
Comment 3 Timothy Hatcher 2014-02-05 11:07:52 PST
CSS profiling has been removed.