Hi,
My prospect has faced performance issues with CSS Selector performance earlier where full DOM Searches were made and it has frozen the screen. After many hours of manual debugging, have fixed it in many places in their App.
Now my prospect has seen that DT shows CSS Selector (DOM Search) calls in Browser Purepaths. They want to know if DT can provide a report can be prepared that shows the below at end of a Unit test run in Dev / CI / QA env:
a) Total number of CSS Selector invocations (Dom Searches)
b) Num of Full DOM Searches
c) Num of DOM Searches that are restricted (filtered) to a specific div.
Can this be done in DT?
I tried creating a Measure for css selector invocation but couldnt find a way of doing it.
Answer by Andreas G. ·
Hi. I think the best measure you can try is the Browser Performance - JavaScript -> Number of Function calls. This measure will count the number of invocations of a certain method that appears on the Browser PurePath. If you specify the method they use to access the DOM elements (that probably depends on the JS Framework they use) then this should work well.
An alternative is to open the Browser Hotspot Dashlet. Search for the CSS Selector Method and then sort by Count
JANUARY 15, 3:00 PM GMT / 10:00 AM ET