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

perf(presentation): Improve presentation rendering performance in Safari #1401

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

jstoffan
Copy link
Collaborator

The Presentation viewer creates all pages of a document as a big stack of elements using absolute positioning. It controls the page elements' visibility via the visibility style directive. However, unlike other browsers, Safari 14 on MacOS Big Sur seems to frequently layout/paint every page of the document, even if the page has visibility: hidden set. Adding opacity: 0 seems to resolve the problem.

@jstoffan jstoffan requested a review from a team as a code owner June 15, 2021 22:51
@@ -84,7 +84,6 @@ $thumbnail-sidebar-width: 191px; // Extra pixel to account for sidebar border
background-color: $d-eight;
border-radius: $thumbnail-border-radius;
box-shadow: 0 0 0 1px $off-white, 0 1px 4px 0 rgba(0, 0, 0, .08);
transition: box-shadow 50ms ease;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed some jank when mousing quickly over different thumbnails, so I removed this brief transition. It's perf-related, but I can move it to a separate PR if desired.

@jstoffan jstoffan merged commit 2ffb42e into box:master Jun 16, 2021
@jstoffan jstoffan deleted the fix-perf-safari branch June 16, 2021 18:33
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.

2 participants