pdf.js/src/core
Jonas Jenwald 4ef547f400 Improve caching of empty /XObjects in the PartialEvaluator.getTextContent method
It turns out that `getTextContent` suffers from *similar* problems with repeated images as `getOperatorList`; please see the previous patch.

While only `/XObject` resources of the `Form`-type will actually be *parsed* in `PartialEvaluator.getTextContent`, since those are the only ones that may contain text, we're still forced to fetch repeated image resources where the name differs (but not the reference).
Obviously it's less bad in this case, since we're not actually parsing `/XObject`s of e.g. the `Image`-type. However, you still want to avoid even fetching the data whenever possible, since `Stream`s are not cached on the `XRef` instance (given their potential size) and the lookup can thus be somewhat expensive in general.

To address these issues, we can simply replace the exiting name-only caching in `PartialEvaluator.getTextContent` with a new cache backed by `LocalImageCache` instead.
2020-05-26 09:49:01 +02:00
..
.eslintrc Reduce usage of SystemJS, in the development viewer, even further 2020-05-20 13:36:52 +02:00
annotation.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
arithmetic_decoder.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
bidi.js Enable the no-nested-ternary ESLint rule (PR 11488 follow-up) 2020-01-14 17:49:39 +01:00
ccitt_stream.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
ccitt.js Enable the dot-notation ESLint rule 2020-04-17 12:24:46 +02:00
cff_parser.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
charsets.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
chunked_stream.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
cmap.js Avoid hanging the worker-thread for CMap data with ridiculously large ranges (issue 11922) 2020-05-22 15:23:17 +02:00
colorspace.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
core_utils.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
crypto.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
document.js Allow GlobalImageCache.clear to, optionally, only remove the actual data (PR 11912 follow-up) 2020-05-23 11:30:24 +02:00
encodings.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
evaluator.js Improve caching of empty /XObjects in the PartialEvaluator.getTextContent method 2020-05-26 09:49:01 +02:00
font_renderer.js Remove variable shadowing from the JavaScript files in the src/core/ folder 2020-03-23 18:28:30 +01:00
fonts.js [src/core/fonts.js] Improve the validateOS2Table function 2020-04-19 11:25:25 +02:00
function.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
glyphlist.js Enable the dot-notation ESLint rule 2020-04-17 12:24:46 +02:00
image_utils.js Improve the *local* image caching in PartialEvaluator.getOperatorList 2020-05-25 15:14:14 +02:00
image.js [api-minor] Decode all JPEG images with the built-in PDF.js decoder in src/core/jpg.js 2020-05-22 00:22:48 +02:00
jbig2_stream.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
jbig2.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
jpeg_stream.js [api-minor] Decode all JPEG images with the built-in PDF.js decoder in src/core/jpg.js 2020-05-22 00:22:48 +02:00
jpg.js [src/core/jpg.js] Remove redundant marker validation at the end of the decodeScan function (PR 11805 follow-up) 2020-04-17 15:40:02 +02:00
jpx_stream.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
jpx.js Enable the dot-notation ESLint rule 2020-04-17 12:24:46 +02:00
metrics.js Enable the dot-notation ESLint rule 2020-04-17 12:24:46 +02:00
murmurhash3.js Ensure that all import and require statements, in the entire code-base, have a .js file extension 2020-01-04 13:01:43 +01:00
obj.js Allow GlobalImageCache.clear to, optionally, only remove the actual data (PR 11912 follow-up) 2020-05-23 11:30:24 +02:00
operator_list.js Gracefully handle annotation parsing errors in Page.getOperatorList (issue 11871) 2020-05-04 17:09:48 +02:00
parser.js Use the ESLint no-restricted-syntax rule to ensure that assert is always called with two arguments 2020-05-05 13:40:05 +02:00
pattern.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
pdf_manager.js Allow GlobalImageCache.clear to, optionally, only remove the actual data (PR 11912 follow-up) 2020-05-23 11:30:24 +02:00
primitives.js Attempt to cache repeated images at the document, rather than the page, level (issue 11878) 2020-05-21 18:13:45 +02:00
ps_parser.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
standard_fonts.js Enable the dot-notation ESLint rule 2020-04-17 12:24:46 +02:00
stream.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
type1_parser.js Enable the dot-notation ESLint rule 2020-04-17 12:24:46 +02:00
unicode.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
worker_stream.js Use the ESLint no-restricted-syntax rule to ensure that assert is always called with two arguments 2020-05-05 13:40:05 +02:00
worker.js Merge pull request #11601 from Snuffleupagus/rm-nativeImageDecoderSupport 2020-05-23 15:33:46 +02:00