gecko-dev/devtools/client/debugger/packages/devtools-source-map
Sorin Davidoi fd9d2baa6d Bug 1588637 - perf: Reduce memory allocation, avoid regular expressions and layout trashing r=davidwalsh
Apply the following optimizations:
 - Don't use regular expressions where they can be avoided
 - Reduce unnecessary memory allocations (e.g. avoid doing a map and a filter by writing the code in an imperative fashion)
 - Reduce layout trashing by using `rAF` and `setTimeout`
 - Perform cheaper checks first in conditional statements

See commit messages for more details.

Differential Revision: https://phabricator.services.mozilla.com/D49214

--HG--
extra : moz-landing-system : lando
2019-10-16 18:44:13 +00:00
..
src Bug 1588637 - perf: Reduce memory allocation, avoid regular expressions and layout trashing r=davidwalsh 2019-10-16 18:44:13 +00:00
LICENSE
README.md
assets.js
jest.config.js
package.json

README.md

Source Maps

This package contains DevTools utilities for working with source maps.

This is used in multiple contexts:

  • The debugger loads this package directly when running from the launchpad in a tab by itself
  • The toolbox inside Firefox loads this package and passes it down to interested tools so that they can share a common instance of the utilities

Application Requirements

This package assumes that an application using this code will make the worker.js, and dwarf_to_json.wasm files available and call startSourceMapWorker(workerURL, wasmRoot) to initialize the worker and specify the location of the wasm asset.