Putting Performance In Perspective

Abierto
#99 2 comentarios 0 reacciones 1 asignado Ver en GitHub

@johnkpaul ya está trabajando en esto.

Desde el 16/10/2012.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Chapter: performance content

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
Lenguaje dominante
JavaScript
Estrellas
914
Forks
472
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de jquery/learn.jquery.com

Todos los issues de jquery/learn.jquery.com

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.