javascript - How can I automatically find out which jQuery selectors are slow on my site ? Is there a plugin for this? -


i automatically detect whenever jquery selector slow (> some_millis) want console log line number.

my first idea override core jquery selector code insert such test there, there existing plugins achieve this, has attempted similar ? browser tool (maybe filter method calls in profiler) ?

note not want put perf monitoring js code around each selector call !

a quick google search yields:

  1. http://seesparkbox.com/foundry/jquery_selector_performance_testing
  2. https://learn.jquery.com/performance/optimize-selectors/

the reference js profiler dead, here preferable way via chrome:

https://developer.chrome.com/devtools/docs/cpu-profiling

now open chrome devtools, navigate profiles panel, , verify "collect javascript cpu profile" selected. now, click start button or press cmd + e start recording javascript cpu profile.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -