-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't attempt to re-create the annotationLayer
, for pages without any annotations, on zooming and rotation
#15806
Don't attempt to re-create the annotationLayer
, for pages without any annotations, on zooming and rotation
#15806
Conversation
f2b07c0
to
0ad985d
Compare
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/8a663acf549899d/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/8a663acf549899d/output.txt Total script time: 1.26 mins Published |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/0aebd2fd43b2c9e/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/d31aad86c8432a6/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/0aebd2fd43b2c9e/output.txt Total script time: 4.14 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/d31aad86c8432a6/output.txt Total script time: 14.81 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you.
…ny annotations, on zooming and rotation For pages without any annotations, applies e.g. to the `tracemonkey.pdf` document, we'll repeatedly try to re-create the `annotationLayer` on every zoom and rotation operation. The reason that this happens is because we don't insert the `annotationLayer`-div into the DOM unless there's annotations present on the page, which thus means that we miss the existing `annotationLayer`-caching present in the `PDFPageView` implementation. This is a very old issue, and the easiest solution is to simply always insert an *empty* (and hidden) `annotationLayer`-div such that the existing code/caching starts working for the "no annotations" case as well. Note that this is consistent with other layers, since e.g. the `textLayer` and/or `annotationEditorLayer` may be empty. Given that only a limited, by default ten, number of pages are ever active at once the additional DOM-elements shouldn't effect things negatively here.
This was essentially done only to compensate for the viewer calling `PDFPageProxy.getAnnotations` unconditionally on every annotationLayer-rendering invocation. With the previous patch that's no longer happening, and this API-caching should thus no longer be necessary.
0ad985d
to
9b6d0d9
Compare
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/ddf801b8f01fa5f/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/35d759b3edbe4be/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/ddf801b8f01fa5f/output.txt Total script time: 4.17 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/35d759b3edbe4be/output.txt Total script time: 16.91 mins
|
Don't attempt to re-create the
annotationLayer
, for pages without any annotations, on zooming and rotationFor pages without any annotations, applies e.g. to the
tracemonkey.pdf
document, we'll repeatedly try to re-create theannotationLayer
on every zoom and rotation operation.The reason that this happens is because we don't insert the
annotationLayer
-div into the DOM unless there's annotations present on the page, which thus means that we miss the existingannotationLayer
-caching present in thePDFPageView
implementation.This is a very old issue, and the easiest solution is to simply always insert an empty (and hidden)
annotationLayer
-div such that the existing code/caching starts working for the "no annotations" case as well.Note that this is consistent with other layers, since e.g. the
textLayer
and/orannotationEditorLayer
may be empty. Given that only a limited, by default ten, number of pages are ever active at once the additional DOM-elements shouldn't effect things negatively here.Remove the API-caching of annotation-data
This was essentially done only to compensate for the viewer calling
PDFPageProxy.getAnnotations
unconditionally on every annotationLayer-rendering invocation. With the previous patch that's no longer happening, and this API-caching should thus no longer be necessary.