Commit Graph
3 Commits
Author SHA1 Message Date
Bryan Thrall f9ee16c613 Bug 1757833 - Add Profiler markers to track compression cost r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D144738
2022-05-17 16:29:04 +00:00
Bryan Thrall 1b711031b7 Bug 1757833 - Add browser.cache.jsbc_compression_level static preference r=nbp
This simplifies profiling since now we can see the results within a single build
based on the preference (though there is still a slight cost to copying the
bytecode).

Setting to (the default) 0 disables compression.

Differential Revision: https://phabricator.services.mozilla.com/D144737
2022-05-17 16:29:04 +00:00
Bryan Thrall 647c123ffc Bug 1757833 - Extract methods ScriptBytecodeCompress and ScriptBytecodeDecompress r=nbp
This leaves the code in ScriptLoader and ScriptLoadHandler a lot more readable.

ScriptBytecodeCompressedDataLayout and ScriptBytecodeDataLayout simplify
locating data in the ScriptLoadRequest bytecode buffer when compressing and
decompressing it.

The interface is still error-prone. For example, these classes don't check
that the returned pointers are within the bounds of the buffer.

Differential Revision: https://phabricator.services.mozilla.com/D145011
2022-05-17 16:29:03 +00:00