- Notifications
You must be signed in to change notification settings - Fork16.8k
fix: prevent loading spinner when launching utility process on Windows#43657
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nikwen commentedSep 10, 2024
@deepak1556 You are the utility process expert. If you have time to review this, I’d appreciate it a lot. Thank you so much in advance! |
deepak1556 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This makes sense, Thanks for working on this!
I would treat this as a bug fix rather than a feature change, since the spinner was never intended.
codebytere left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
i'm 👍🏻 on the goal here, but if we're going to add it in as a configurable option despite Electron wanting it off in all cases we should try to upstream it to Chromium and see what their feedback is.
If they indicate they're not open to it, we should make this patch surface smaller by just disabling the cursor in all cases since that's what we're doing in practice.
deepak1556 commentedSep 10, 2024
The patch only controls the utility process code path, we don't adjust the process launch choices for renderer. I don't think we want to change the feedback in all cases. Ideally, the way to reduce this patch surface would be rewrite the utility process api directly on top of the |
deepak1556 commentedSep 10, 2024
Given this issue is only visible when launching a significant number of utility process in a short time which would not be the case in upstream, not sure if it would be of value in upstream to have an option in the |
nikwen commentedSep 10, 2024
Thanks for the reviews and comments,@deepak1556 and@codebytere! As@deepak1556 said, the "feedback cursor off" option is passed down multiple layers (like all other Electron utility process options) so that it doesn't affect other process types. Re upstreaming:
|
nikwen commentedSep 10, 2024
ThemacOS build failure was due to an auth problem. I'll sign the commit soon. |
codebytere commentedSep 10, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@nikwen we'd want to upstream the option to configure in such a way that we don't need to have this patch, essentially. How we do that i don't feel as strongly about - my goal is just to get rid of the patch. To answer the rest of your first question - it's less specifically about whether it would provide value to Chromium and more about how this patch complies with ourpatch policy - I'd prefer we not float something like this indefinitely if we can help it! To your second question - i can take a shot at it :) |
deepak1556 commentedSep 10, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@codebytere if the goal is to remove the patch in its entirety then we should evaluate using Edit: We also have patches to customize the current process host to emit exit codes, and hacks to preserve shutdown ordering like electron/shell/browser/electron_browser_main_parts.cc Lines 565 to 592 in0cc6050
|
nikwen commentedSep 10, 2024
Thank you,@codebytere! I appreciate that. :) Your explanation makes sense. To give the Chromium team a reason to incorporate the change, it might be useful to find a process in Chrome that would benefit from having this flag set. As a side note: When making changes to the patch file, I made sure to keep the maintenance burden as low as possible by only changing the code in places that were already being modified. |
nikwen commentedSep 10, 2024
@deepak1556 I like that idea! |
2659632 to53d2b61Comparenikwen commentedSep 10, 2024
Commit is signed now. (No code changes in the force push.) |
codebytere left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Given migrating tobase::Launch will be a heftier task and this is a fairly trivial addition to existing maintenance burden I'd be ok with merging this as-is and working on the migration as a follow up after some thought.
nikwen commentedSep 13, 2024
Is anything else required from my side to get this merged? |
Release Notes Persisted
|
I was unable to backport this PR to "32-x-y" cleanly; |
I was unable to backport this PR to "31-x-y" cleanly; |
I have automatically backported this PR to "33-x-y", please check out#43731 |
nikwen commentedSep 16, 2024
Thanks for your help,@deepak1556,@codebytere and@jkleinsc! 🙌 I'll work on the manual backports this week. |
electron#43657)fix: prevent spinning cursor when launching utility process on Windows
electron#43657)fix: prevent spinning cursor when launching utility process on Windows
electron#43657)fix: prevent spinning cursor when launching utility process on Windows
Description of Change
Closes#43341.
When a process is started on Windows, the mouse cursor turns into a loading spinner. This makes sense for UI processes (e.g. new windows) but not for background utility processes.
Especially if an app launches many utility processes, the end user might see a large number of confusing loading spinners where the end user doesn’t know where they are coming from.
Try this Fiddle gist for a demonstration of how awful that behavior can be:https://gist.github.com/nikwen/a705df773120f46805d521c6485a9f2e
This pull request disables the loading spinner.
Before the PR
Before.mp4
After the PR
After.mp4
Checklist
npm testpassesRelease Notes
Notes: Fixed mouse cursor turning into loading spinner when starting utility process on Windows.