Skip to content
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

A couple of (small) tweaks of the AnnotationStorage (PR 12173 follow-up) #12192

Conversation

Snuffleupagus
Copy link
Collaborator

  • Initialize the AnnotationStorage-instance, on PDFDocumentProxy, lazily.
  • Change the AnnotationStorage to use a Map internally, rather than a regular Object (simplifies the following points).
  • Let AnnotationStorage.getAll return null when there's no data stored, to avoid unnecessary parsing on the worker-thread. This ought to "just work", since the worker-thread code should already handle the !annotationStorage case everywhere.
  • Add a new AnnotationStorage.size getter, to be able to easily tell if there's any data stored.

…w-up)

 - Initialize the `AnnotationStorage`-instance, on `PDFDocumentProxy`, lazily.
 - Change the `AnnotationStorage` to use a `Map` internally, rather than a regular Object (simplifies the following points).
 - Let `AnnotationStorage.getAll` return `null` when there's no data stored, to avoid unnecessary parsing on the worker-thread. This ought to "just work", since the worker-thread code *should* already handle the `!annotationStorage` case everywhere.
 - Add a new `AnnotationStorage.size` getter, to be able to easily tell if there's any data stored.
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/ffcd72c3033e823/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/74a867e08353a38/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/74a867e08353a38/output.txt

Total script time: 3.85 mins

  • Unit Tests: FAILED

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/ffcd72c3033e823/output.txt

Total script time: 5.08 mins

  • Unit Tests: Passed

@timvandermeij timvandermeij merged commit 57c9888 into mozilla:master Aug 11, 2020
@timvandermeij
Copy link
Contributor

Looks good!

@timvandermeij timvandermeij added annotations form-acroform Gecko 81 Tracking work planned for Form Fill in Shirley 81 release labels Aug 11, 2020
@Snuffleupagus Snuffleupagus deleted the misc-AnnotationStorage-improvements branch August 12, 2020 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotations core form-acroform Gecko 81 Tracking work planned for Form Fill in Shirley 81 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants