Jonas Jenwald
f5a617a334
Make the decodeHuffman
function, in src/core/jpg.js
, slightly more efficient
Rather than repeating the `typeof node` check twice, we can use a `switch` statement instead.
This patch was tested using the PDF file from issue 3809, i.e. https://web.archive.org/web/20140801150504/http://vs.twonky.dk/invitation.pdf, with the following manifest file:
```
[
{ "id": "issue3809",
"file": "../web/pdfs/issue3809.pdf",
"md5": "",
"rounds": 50,
"type": "eq"
}
]
```
which gave the following results when comparing this patch against the `master` branch:
```
-- Grouped By browser, stat --
browser | stat | Count | Baseline(ms) | Current(ms) | +/- | % | Result(P<.05)
------- | ------------ | ----- | ------------ | ----------- | --- | ----- | -------------
Firefox | Overall | 50 | 12537 | 12451 | -86 | -0.69 | faster
Firefox | Page Request | 50 | 5 | 5 | 0 | 0.77 |
Firefox | Rendering | 50 | 12532 | 12446 | -86 | -0.69 | faster
```
2020-01-28 14:23:58 +01:00
..
2020-01-25 00:20:22 +01:00
2019-12-26 12:34:24 +01:00
2020-01-14 17:49:39 +01:00
2020-01-25 00:20:22 +01:00
2020-01-25 00:20:22 +01:00
2020-01-25 00:20:22 +01:00
2019-12-26 12:34:24 +01:00
2020-01-25 00:20:22 +01:00
2020-01-25 00:20:23 +01:00
2020-01-25 00:20:22 +01:00
2020-01-25 00:33:52 +01:00
2020-01-25 00:20:23 +01:00
2020-01-25 21:38:34 +01:00
2019-12-26 12:34:24 +01:00
2020-01-25 21:32:28 +01:00
2020-01-25 00:20:23 +01:00
2020-01-25 00:33:52 +01:00
2020-01-25 00:20:22 +01:00
2020-01-04 13:01:43 +01:00
2020-01-04 13:01:43 +01:00
2020-01-25 00:20:22 +01:00
2020-01-25 00:20:22 +01:00
2020-01-25 00:33:52 +01:00
2020-01-25 00:20:22 +01:00
2020-01-28 14:23:58 +01:00
2020-01-25 00:20:22 +01:00
2020-01-25 00:33:52 +01:00
2020-01-04 13:01:43 +01:00
2020-01-04 13:01:43 +01:00
2020-01-25 00:20:22 +01:00
2020-01-04 13:01:43 +01:00
2020-01-25 00:33:52 +01:00
2020-01-25 00:20:22 +01:00
2020-01-04 13:01:43 +01:00
2020-01-25 00:20:22 +01:00
2020-01-25 00:33:52 +01:00
2020-01-04 13:01:43 +01:00
2020-01-25 00:33:52 +01:00
2020-01-25 00:33:52 +01:00
2020-01-04 13:01:43 +01:00
2020-01-04 13:01:43 +01:00
2020-01-16 15:11:56 +01:00