Skip to content

Putting Performance In Perspective #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ajpiano opened this issue Mar 28, 2012 · 2 comments
Open

Putting Performance In Perspective #99

ajpiano opened this issue Mar 28, 2012 · 2 comments

Comments

@ajpiano
Copy link
Member

ajpiano commented Mar 28, 2012

The internet is rife with all sorts of advice about performance, and jQuery and JavaScript performance in particular. Unfotunately, a lot of this filters down into a context-free echo chamber that has mixed-results in end-developer code. For instance, you'll see people who think nothing of nesting several AJAX calls, but then they'll end up doing a manual for loop over jQuery selections in in those nested callbacks because they "heard $.each was slow." We should breathe some sanity into this discussion and provide context for our other performance tips by explaining basic things like

  • importance of profiling
  • optimizing the things that will give you the biggest payoff/that have room for optimation (don't optimize the thing taking 1% of the time)
  • balancing performance with maintainability/readability
  • avoiding premature optimization, but also, what to prematurely optimize, e.g., caching jQuery collections is not only better because it's faster, but because it improves readability and code structure
  • library problems are likely different than your problems. in other words, if your app is slow, it's probably not because of scope chain traversal
  • if the only thing slow about your app is the overhead of $.each, have a Diet Coke
@addyosmani
Copy link
Member

Worth locating and pulling in resources that cover the sub-topics you mentioned above? Profiling, readability, library concerns seem to have been written about by the community at large over the past few months.

@ghost ghost assigned johnkpaul Oct 16, 2012
@arthurvr
Copy link
Member

arthurvr commented Jan 7, 2015

@johnkpaul Seems like you got assigned to this. Is it something you'd like to take?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants