-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly transfer objects between the main thread and web worker. (#4…
…6061) We need to make sure to add objects to the transfer list when we send them across the ui thread/web worker boundary. Otherwise, they get copied, which is very expensive. On my M1 MacBook Pro, I took measurements of scrolling in the material 3 demo. Before this change, the work on the web worker thread was taking about 25-40ms per frame. After the change, it's around 2ms.
- Loading branch information
1 parent
3171f20
commit 556c613
Showing
2 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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