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

Fix: construct annotator when BoxAnnotations loads #842

Merged
merged 5 commits into from
Sep 17, 2018

Conversation

ConradJChan
Copy link
Contributor

@ConradJChan ConradJChan commented Sep 13, 2018

Instead of waiting for the Preview viewer to finish loading before constructing the Annotator (which fetches the annotations for the file) we construct the Annotator as soon as the BoxAnnotations static assets are loaded.

From testing on my computer, saw a slight boost of 200-300ms in loading preview with annotations with caching disabled (or about the time it takes to do a network roundtrip for the annotations call). With caching there wasn't much of a time difference since the BoxAnnotations assets were already fetched.

@boxcla
Copy link

boxcla commented Sep 13, 2018

Verified that @ConradJChan has signed the CLA. Thanks for the pull request!

@pramodsum
Copy link
Contributor

Make sure you test the case where Preview doesn't have to fetch the static assets and an instance of BoxAnnotations is passed as an option to Preview

@ConradJChan ConradJChan merged commit 20cc3c5 into box:master Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants