开发者

Web browser plugin for jquery performance optimization

Attempting to improve the perforance of my jquery开发者_开发百科 - so step 1 for me is to optimize my selectors. I have been using jsperf.com which has been helpful but is there any web browser plugin that I can use that will do similar as jsperf? ie. I can enter several different selectors and it tell me which is the slowest etc or the timing each selector takes.


Can you post your jquery? A good place to start is using firebugs console tab and running the profiler, this will point out what functions are taking the longest to run.

In many cases I have found that using plain javascript where possible instead of jquery will improve performance, an example of this is the .each() function in jquery can be written as a for loop in javascript, for large sets of data it can make a big difference.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜