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

main: do not lower priority of rendering when in background #2546

Merged

Conversation

amartinz
Copy link
Member

This prevents rendering getting slow when switching to other
applications while installing, which results in the installer
interacting with the device while GUI is trying to catch up
with the installation process.

@amartinz amartinz force-pushed the disable-renderer-backgrounding branch from 1882922 to 4f7279b Compare April 26, 2022 13:10
src/main.js Outdated
@@ -29,6 +29,12 @@ const reporter = require("./lib/reporter.js");
const menuManager = require("./lib/menuManager.js");
const core = require("./core/core.js");

// Do not lower priority of rendering when in background
// - See: https://www.electronjs.org/de/docs/latest/api/command-line-switches#--disable-renderer-backgrounding
if (typeof app.commandLine !== 'undefined') {
Copy link
Member Author

Choose a reason for hiding this comment

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

Had to add the check because jest does not know about app.commandLine.

Please let me know, if there is a better way to solve this :)

@codecov
Copy link

codecov bot commented Apr 26, 2022

Codecov Report

Merging #2546 (bb6c484) into master (c86c0e3) will decrease coverage by 0.05%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #2546      +/-   ##
==========================================
- Coverage   76.20%   76.15%   -0.06%     
==========================================
  Files          29       29              
  Lines         954      956       +2     
==========================================
+ Hits          727      728       +1     
- Misses        227      228       +1     
Impacted Files Coverage Δ
src/main.js 37.25% <50.00%> (+0.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c86c0e3...bb6c484. Read the comment docs.

This prevents rendering getting slow when switching to other
applications while installing, which results in the installer
interacting with the device while GUI is trying to catch up
with the installation process.

Change-Id: I201defba33d76322d3405d254b7a4b6ba3530bd1
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
@amartinz amartinz force-pushed the disable-renderer-backgrounding branch from 4f7279b to bb6c484 Compare April 26, 2022 13:51
@NeoTheThird NeoTheThird merged commit e60658e into ubports:master Jun 3, 2022
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

Successfully merging this pull request may close these issues.

2 participants