Conversation
Contributor
rganchev
commented
Jan 28, 2026
- Investigation showed that the crashes on mobile Safari were caused by the CSS transform being applied to the whole DOM container that contains all tapestry elements. This causes Safari to generate huge GPU textures (hundreds of MB) for its drawing layers and at some point it runs out of memory.
- CSS transformations are now applied to each tapestry element separately. This has the following effects:
- GPU textures are much smaller. OOMs still can occur in large tapestries but are much rarer than before.
- CPU usage is higher, because the browser now needs to calculate multiple transformation matrices on each layout.
- Moving the CSS transformations messed up the stacking contexts so I had to adjust some z-indexes to arrange the UI.
Sachanski
approved these changes
Jan 28, 2026
Collaborator
Sachanski
left a comment
There was a problem hiding this comment.
If you feel like it, you can clean up some workarounds that were put in previous attempts to tackle this issue:
client/src/pages/tapestry/styles.module.css- .hidden applied to the pixi container for the presentationcore-client/src/components/tapestry/items/pdf/styles.module.css- &.interactive'soverflow: autocan now be always applied. This will leave to a better UX, since right now if the user scrolls a pdf to some point and deactivates it, the document is scrolled to the top.core-client/src/components/tapestry/items/text/styles.module.css- this should be similar to the above, only for text boxescore-client/src/components/tapestry/items/video/player.tsx- theMediaPlayeris set to display: none for layering purposes, although I don't think this causes oddities in the UXviewer/src/index.css- there is awill-change: transformthere that can probably be removed
Contributor
Author
|
@Sachanski I will consider these changes in a follow-up PR. I have tried them locally, but some of them re-introduce other Safari layering problems and need to be examined carefully. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.