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

Revisit workaround for window resizing events overloading the shadow queue #459

Closed
tido64 opened this issue Jun 18, 2020 · 4 comments
Closed

Comments

@tido64
Copy link
Member

tido64 commented Jun 18, 2020

In order to fix #322 and #422, we've added throttling of layout events (#439) to reduce load on the shadow queue. Post-Fabric, we should revisit this workaround and see if we can implement a proper fix.

@ghost ghost added the Needs: Triage 🔍 label Jun 18, 2020
@tido64
Copy link
Member Author

tido64 commented Jun 18, 2020

cc @tom-un

@github-actions
Copy link

github-actions bot commented Jun 6, 2022

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jun 6, 2022
@Saadnajmi
Copy link
Collaborator

I would like to keep this open.

@github-actions github-actions bot removed the Stale label Jun 7, 2022
christophpurrer pushed a commit to christophpurrer/react-native-macos that referenced this issue Aug 2, 2022
…crosoft#439)"

This change reverts microsoft#459 - but still tries to address the original issues:
- microsoft#422
- microsoft#322

This also addresses an issue when programmatically resizing windows where the RCTRootContentView may end up at the wrong size because an in-flight layout gets resolved after the resize on the main thread.
We now keep sync dispatch on the shadow queue for live resizing windows (to prevent tearing) but also dispatch async (as done on iOS) so the latest new size is sure to win.
The block has a check to bail if the size doesn't change, so this isn't a perf drain running the block twice.
christophpurrer pushed a commit to christophpurrer/react-native-macos that referenced this issue Aug 2, 2022
…crosoft#439)"

This change reverts microsoft#459 - but still tries to address the original issues:
- microsoft#422
- microsoft#322

This also addresses an issue when programmatically resizing windows where the RCTRootContentView may end up at the wrong size because an in-flight layout gets resolved after the resize on the main thread.
We now keep sync dispatch on the shadow queue for live resizing windows (to prevent tearing) but also dispatch async (as done on iOS) so the latest new size is sure to win.
The block has a check to bail if the size doesn't change, so this isn't a perf drain running the block twice.
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this issue Aug 4, 2022
…crosoft#439)" (microsoft#1318)

This change reverts microsoft#459 - but still tries to address the original issues:
- microsoft#422
- microsoft#322

This also addresses an issue when programmatically resizing windows where the RCTRootContentView may end up at the wrong size because an in-flight layout gets resolved after the resize on the main thread.
We now keep sync dispatch on the shadow queue for live resizing windows (to prevent tearing) but also dispatch async (as done on iOS) so the latest new size is sure to win.
The block has a check to bail if the size doesn't change, so this isn't a perf drain running the block twice.

Co-authored-by: Scott Kyle <[email protected]>
@christophpurrer
Copy link

Can this one be closed now since #1318 landed?

shwanton pushed a commit to shwanton/react-native-macos that referenced this issue Feb 13, 2023
…crosoft#439)" (microsoft#1318)

This change reverts microsoft#459 - but still tries to address the original issues:
- microsoft#422
- microsoft#322

This also addresses an issue when programmatically resizing windows where the RCTRootContentView may end up at the wrong size because an in-flight layout gets resolved after the resize on the main thread.
We now keep sync dispatch on the shadow queue for live resizing windows (to prevent tearing) but also dispatch async (as done on iOS) so the latest new size is sure to win.
The block has a check to bail if the size doesn't change, so this isn't a perf drain running the block twice.

Co-authored-by: Scott Kyle <[email protected]>
shwanton pushed a commit to shwanton/react-native-macos that referenced this issue Mar 10, 2023
…crosoft#439)" (microsoft#1318)

This change reverts microsoft#459 - but still tries to address the original issues:
- microsoft#422
- microsoft#322

This also addresses an issue when programmatically resizing windows where the RCTRootContentView may end up at the wrong size because an in-flight layout gets resolved after the resize on the main thread.
We now keep sync dispatch on the shadow queue for live resizing windows (to prevent tearing) but also dispatch async (as done on iOS) so the latest new size is sure to win.
The block has a check to bail if the size doesn't change, so this isn't a perf drain running the block twice.

Co-authored-by: Scott Kyle <[email protected]>
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

No branches or pull requests

4 participants