1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 07:08:08 +02:00
pdf.js/src
Jonas Jenwald cb5f9df0c8 [EnhanceTextSelection] Make expandTextDivs more efficient by updating all styles at once instead of piecewise
I intended to provide proper benchmarking results here, as outlined in https://github.com/mozilla/pdf.js/wiki/Benchmarking-your-changes, but after wasting a couple of hours over the weekend getting weird results I gave up.
It appears that there's a lot of, i.e. way too much, variance between subsequent runs of `text` tests for the results to be meaningful.
(Previously I've only benchmarked `eq` tests, so I don't know if the `text` tests has never worked well or if it's a newer problem. For reference, please see the results of back-to-back benchmark runs on the current `master` with a *very* simple manifest file: [link here].)

Instead I used `console.time/timeEnd` in `appendText` and `expandTextDivs` to be able to compare the performance with/without the patch. The entire viewer was (skip-cache) reloaded between measurements, and the result are available here: [link here].
Given the troubles I've had with benchmarking, I've not yet computed any statistics on the results (e.g. mean, variance, confidence intervals, and so on).
However, just by looking at the data I think it's safe to say that this patch first of all doesn't seem to regress the current performance. Secondly it certainly looks *very* likely that this patch actually improves the performance, especially for the one-glyph-per-text-div case (cf. issue 7224).

Re: issue 7584.
2016-09-14 21:19:28 +02:00
..
core Text widget annotations: implement unit testing and sanitize data values 2016-09-13 14:57:11 +02:00
display [EnhanceTextSelection] Make expandTextDivs more efficient by updating all styles at once instead of piecewise 2016-09-14 21:19:28 +02:00
images Vectorize the logo. 2012-10-29 14:08:52 -04:00
shared Fix lint warnings in URL polyfill 2016-09-12 20:34:51 +05:30
doc_helper.js Proxy global PDFJS.verbosity to properly configure shared/util. 2016-03-23 19:24:37 -05:00
frameworks.js Merge pull request #7189 from yurydelendik/webpack-browserify-love 2016-04-13 08:42:11 -05:00
main_loader.js Exposes all functional members via lib exports and use them in viewer. 2016-04-07 13:46:07 -05:00
pdf.js Exposes all functional members via lib exports and use them in viewer. 2016-04-07 13:46:07 -05:00
pdf.worker.entry.js Removing "entry-loader" dependency from webpack. 2016-04-13 08:24:25 -05:00
worker_loader.js Improve work-around for importScripts bug. 2016-02-03 23:30:27 +01:00