Skip to content

fix: restore performance of macOS window resizing - #40577

Merged
MarshallOfSound merged 1 commit into
mainfrom
fix-window-resize
Nov 22, 2023
Merged

MarshallOfSound merged 1 commit into
mainfrom
fix-window-resize

Conversation

@MarshallOfSound

@MarshallOfSound MarshallOfSound commented Nov 21, 2023 •

Copy link
Copy Markdown
Member

As in title, technically an upstream of a discord downstream patch --> discord@a712b66

Fixes an ongoing perf issue with window resizing on macOS by reverting an android-only fix in Chromium

Notes: Fixed resizing performance issue on macOS

@MarshallOfSound
MarshallOfSound requested a review from a team as a code owner November 21, 2023 23:08
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Nov 21, 2023
@MarshallOfSound MarshallOfSound added target/26-x-y PR should also be added to the "26-x-y" branch. target/27-x-y PR should also be added to the "27-x-y" branch. target/28-x-y PR should also be added to the "28-x-y" branch. and removed new-pr 🌱 PR opened recently labels Nov 21, 2023
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Nov 21, 2023
@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes and removed new-pr 🌱 PR opened recently labels Nov 21, 2023
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Nov 21, 2023
@nornagon

Copy link
Copy Markdown
Contributor

has this been fixed upstream too?

@MarshallOfSound

Copy link
Copy Markdown
Member Author

has this been fixed upstream too?

No, it doesn't impact upstream, but I'm figuring out if I can make this change behind an desktop vs mobile check or something and upstream that. For now this is a lightweight patch that fixes a rather annoying bug on our side with low risk (because it's reverting an android only fix)

@zcbenz

zcbenz commented Nov 22, 2023

Copy link
Copy Markdown
Contributor

Do you have a screencast that shows the difference? It should be possible to have Chromium revert the change for at least desktop if you can show them the downgraded performance.

@bpasero

bpasero commented Nov 22, 2023

Copy link
Copy Markdown
Contributor

One thing I notice with Electron apps is how slow the content responds to resize events when quickly done rapidly:

Recording 2023-11-22 at 07 19 19

Curious if this change would have an impact 🤔

@MarshallOfSound

Copy link
Copy Markdown
Member Author

Curious if this change would have an impact 🤔

This is exactly what this fixes

@MarshallOfSound

Copy link
Copy Markdown
Member Author

Do you have a screencast that shows the difference? It should be possible to have Chromium revert the change for at least desktop if you can show them the downgraded performance.

I'll include a screencast when I bug this upstream 👍

@MarshallOfSound
MarshallOfSound merged commit 1574cbf into main Nov 22, 2023
@MarshallOfSound
MarshallOfSound deleted the fix-window-resize branch November 22, 2023 07:58
@release-clerk

release-clerk Bot commented Nov 22, 2023

Copy link
Copy Markdown

Release Notes Persisted

Fixed resizing performance issue on macOS

@trop

trop Bot commented Nov 22, 2023

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "26-x-y", please check out #40584

@trop trop Bot removed the target/26-x-y PR should also be added to the "26-x-y" branch. label Nov 22, 2023
@trop

trop Bot commented Nov 22, 2023

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "27-x-y", please check out #40585

@trop

trop Bot commented Nov 22, 2023

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "28-x-y", please check out #40586

@trop trop Bot added in-flight/28-x-y and removed target/27-x-y PR should also be added to the "27-x-y" branch. target/28-x-y PR should also be added to the "28-x-y" branch. labels Nov 22, 2023
@deepak1556

Copy link
Copy Markdown
Member

No, it doesn't impact upstream,

@MarshallOfSound curious why this issue does not impact desktop upstream ? Is there anything unique to the code path in question that has behavior differences between electron and chrome ?

@MarshallOfSound

Copy link
Copy Markdown
Member Author

curious why this issue does not impact desktop upstream ? Is there anything unique to the code path in question that has behavior differences between electron and chrome ?

I was interested in this too but couldn't figure it out. There's definitely something different here (which would be good to figure out separately). Will dig in deeper tomorrow.

@trop trop Bot added merged/26-x-y PR was merged to the "26-x-y" branch. merged/28-x-y PR was merged to the "28-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. and removed in-flight/26-x-y in-flight/28-x-y in-flight/27-x-y labels Nov 22, 2023
Comment on lines +6 to +8
Reverts https://chromium-review.googlesource.com/c/chromium/src/+/3118293 which
fixed a android only regression but in the process regressed electron window
resize perf wildly on macOS.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Per our patch policy, all patches are required to include in their description either (a) conditions for the patch's removal, or (b) a reason why the patch can't be removed. Please update this description 🙇🏻

@bpasero

bpasero commented Nov 23, 2023

Copy link
Copy Markdown
Contributor

I just played around with the newly released Electron 27.1.2 and unfortunately do not see a difference:

Recording 2023-11-23 at 09 10 01

Filed #40603, because I cannot reproduce in web only.

@dtzxporter

Copy link
Copy Markdown

I would also like to mention that the issue we commented on in #36280 is also not resolved by this PR using 27.1.2:
image

MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
@cyhnkckali

Copy link
Copy Markdown

Same error persists in Windows

@nkallen

nkallen commented Dec 15, 2024

Copy link
Copy Markdown

The problem persists and in fact I would say it's gotten significantly worse on Mac as of Electron 29 and on Windows as of Electron 28. There is a perhaps related chromium bug that is not yet fixed:

https://issues.chromium.org/issues/376296999

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. merged/28-x-y PR was merged to the "28-x-y" branch. new-pr 🌱 PR opened recently semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants