mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Attempt to also cache images at the "page"-level (issue 16263)
Currently we have two separate image-caches on the worker-thread: - A local one, which is unique to each `PartialEvaluator.getOperatorList` invocation. This one caches both names *and* references, since image-resources may be accessed in either way. - A global one, which applies to the entire PDF documents and all its pages. This one only caches references, since nothing else would work. This patch introduces a third image-cache, which essentially sits "between" the two existing ones. The new `RegionalImageCache`[1] will be usable throughout a `PartialEvaluator` instance, and consequently it *only* caches references, which thus allows us to keep track of repeated image-resources found in e.g. different /Form and /SMask objects. --- [1] For lack of a better word, since naming things is hard...
This commit is contained in:
parent
195db2cff5
commit
9881dbf927
5 changed files with 63 additions and 9 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -225,6 +225,7 @@
|
|||
!issue840.pdf
|
||||
!160F-2019.pdf
|
||||
!issue4402_reduced.pdf
|
||||
!issue16263.pdf
|
||||
!issue845r.pdf
|
||||
!issue3405r.pdf
|
||||
!issue14130.pdf
|
||||
|
|
BIN
test/pdfs/issue16263.pdf
Normal file
BIN
test/pdfs/issue16263.pdf
Normal file
Binary file not shown.
|
@ -4721,6 +4721,12 @@
|
|||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue16263",
|
||||
"file": "pdfs/issue16263.pdf",
|
||||
"md5": "93c3e7884f1f2d072442898127e0a6fd",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue2006",
|
||||
"file": "pdfs/issue2006.pdf",
|
||||
"md5": "71ec73831ece9b508ad20efa6ff28642",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue