MDN wants to talk to developers like you: https://qsurvey.mozilla.com/s3/8d22564490d8

Performance

Esta tradução está incompleta. Por favor, ajude a traduzir este artigo.

Os links dos artigos aqui o ajudarão a melhorar a performance, se você estiver desenvolvendo um código de núcleo da Mozilla ou uma extensão.

Documentação

Reportiando um problema de performance
Um amigável guia do usuário para reportar um problema de performance. Um ambiente de desenvolvimento não é necessário.
Melhores práticas de performance em extensões 
Um guia de "melhores práticas" para desenvolvedores de extensões.
Medição da performance de inicialização da extensão
Um guia para desenvolvedores de extensões de como configurar um ambiente de teste de performance.
Escola XUL: Performance em Extensões
Dicas para desenvolvedores de extensões para ajudá-los a evitar prejudicar a performance do aplicativo.
Performance do GPU
Dicas de criação de perfil e melhorias de performance com o uso de uma GPU.

Veja todas as páginas com a marca "Performance"...

Ferramentas de criação de perfil e detecção de perdas de memória

about:memory
about:memory é a ferramenta mais fácil para medir o uso em código Mozilla, e o melhor lugar para começar. Também deixa você fazer outras operações relacionadas à memória como chamar GC e CC, esvaziar os logs de GC e CC, e esvaziar os relatórios de DMD. about:memory é feito no topo da infraestrutura de relatório de memória do Firefox.
DMD
DMD é uma ferramenta que identifica deficiências nas medidas do about:memory, e também pode fazer múltiplos tipos de criação de perfis de pilha.
areweslimyet.com
areweslimyet.com (a.k.a. AWSY) is a memory usage and regression tracker.
BloatView
BloatView prints per-class statistics on allocations and refcounts, and provides gross numbers on the amount of memory being leaked broken down by class. It is used as part of Mozilla's continuous integration testing.
Refcount tracing and balancing
Refcount tracing and balancing are ways to track down leaks caused by incorrect uses of reference counting. They are slow and not particular easy to use, and thus most suitable for use by expert developers.
GC and CC logs
GC and CC logs can be generated and analyzed to in various ways. In particular, they can help you understand why a particular object is being kept alive.
Valgrind
Valgrind is a tool that detects various memory-related problems at runtime, including leaks. Valgrind is used as part of Mozilla's continuous integration testing, though the coverage is limited because Valgrind is slow.
LeakSanitizer
LeakSanitizer (a.k.a. LSAN) is similar to Valgrind, but it runs faster because it uses static source code instrumentation. LSAN is part of Mozilla's continuous integration testing, with most tests running through it as part of the AddressSanitizer (a.k.a. ASAN) test jobs.
Apple tools
Apple provides some tools for Mac OS X that report similar problems to those reported by LSAN and Valgrind. The "leaks" tool is not recommended for use with SpiderMonkey or Firefox, because it gets confused by tagged pointers and thinks objects have leaked when they have not (see bug 390944).
Leak Gauge
Leak Gauge is a tool that can be used to detect certain kinds of leaks in Gecko, including those involving documents, window objects, and docshells.
LogAlloc
LogAlloc is a tool that dumps a log of memory allocations in Gecko. That log can then be replayed against Firefox's default memory allocator independently or through another replace-malloc library, allowing the testing of other allocators under the exact same workload.

See also the documentation on Leak-hunting strategies and tips.

Profiling and performance tools

Profiling with the Built-in Profiler
The built-in profiler is a good tool to start with.
Profiling with Instruments
How to use Apple's Instruments tool to profile Mozilla code.
Profiling with Xperf
How to use Microsoft's Xperf tool to profile Mozilla code.
Profiling with Zoom
Zoom is a profiler for Linux done by the people who made Shark
Measuring performance using the PerfMeasurement.jsm code module
Using PerfMeasurement.jsm to measure performance data in your JavaScript code.
Adding a new Telemetry probe
Information on how to add a new measurement to the Telemetry performance-reporting system
Profiling JavaScript with Shark
How to use the Mac OS X Shark profiler to profile JavaScript code in Firefox 3.5 or later.
Profiling with Shark
How to use Apple's Shark tool to profile Mozilla code.
Investigating CSS Performance
How to figure out why restyle is taking so long
JavaScript, XPCOM, Developing Mozilla, Extensions, Addons

 

Etiquetas do documento e colaboradores

 Colaboradores desta página: gcacars, jrmuizel
 Última atualização por: gcacars,