1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-29 15:47:57 +02:00
pdf.js/test/unit
Nicholas Nethercote b3024db677 Estimate the size of decoded streams in advance.
When decoding a stream, the decode buffer is often grown multiple times, its
byte size increasing like so: 512, 1024, 2048, etc. This patch estimates the
minimum size in advance (using the length of the encoded stream), often
allowing the smaller sizes to be skipped. It also renames numerous |length|
variables as |maybeLength| to make it clear that they can be |null|.

I measured this change on eight documents. This change reduces the cumulative
size of decode buffer allocations by 0--32%, with 10--20% being typical. This
reduces peak RSS by 10 or 20 MiB for several of them.
2014-03-13 02:06:58 -07:00
..
api_spec.js Introduces LegacyPromise; polyfills DOM Promise 2014-01-03 18:17:05 -06:00
cmap_spec.js Read multi-byte character codes based on codespace ranges. 2013-09-25 10:32:04 -07:00
crypto_spec.js Use a cache to minimize the number of Name objects. 2014-02-27 20:41:03 -08:00
evaluator_spec.js Extracts evaluator preprocessor and refactor text extraction 2014-01-17 07:16:52 -06:00
font_spec.js Fixes incorrect unit test 2013-05-16 12:15:01 -05:00
function_spec.js Adds web/* and test/* for jshint target 2013-02-04 12:01:19 -06:00
metadata_spec.js Adds web/* and test/* for jshint target 2013-02-04 12:01:19 -06:00
obj_spec.js Use a cache to minimize the number of Name objects. 2014-02-27 20:41:03 -08:00
parser_spec.js Rewrite Lexer_getNumber. 2014-02-01 21:46:09 +01:00
stream_spec.js Estimate the size of decoded streams in advance. 2014-03-13 02:06:58 -07:00
testreporter.js Updated to current latest stable version of jshint. 2014-03-01 13:31:25 -08:00
unit_test.html Basic function.js split 2014-01-27 20:29:47 -06:00
util_spec.js Use a cache to minimize the number of Name objects. 2014-02-27 20:41:03 -08:00