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

Don't do explicit on demand component update check while startup #12983

Open
simonhong opened this issue Dec 2, 2020 · 6 comments
Open

Don't do explicit on demand component update check while startup #12983

simonhong opened this issue Dec 2, 2020 · 6 comments

Comments

@simonhong
Copy link
Member

Maybe we have to do explicit update check during the startup for some components but not all.
With delayed update check(ex, 1 or 5 mins later), we could speed up startup performance a little bit.

@mherrmann
Copy link

You're aware of this @simonhong but just to give others who read this some context.

There are two different kinds of update checks when it comes to components: Automatic and on-demand. Automatic updates are currently broken (#10464) but will likely be fixed soon.

As far as I am aware, installation of a component works by registering it with version 0.0.0.0, then performing an on-demand update check for it.

Brave currently relies on auto-update checks being broken by leaving unwanted Google components in the 0.0.0.0 state forever. To install the components it does want, Brave performs an on-demand update check for them. Before we can merge the fix for #10464, we will have to remove Google's unwanted 0.0.0.0 components (#11544).

A key difference between automatic and on-demand updates are that the former requests an update for all currently registered components, while the latter only requests an update for a single component.

There already is a delayed automatic update check that happens 60 seconds after Brave is started. See CheckForUpdates in component_updater_service.cc.

To implement this issue, it might therefore be enough to remove those on-demand update checks that are not necessary, and wait the 60 seconds for the built-in automatic check.

@simonhong
Copy link
Member Author

@mherrmann Many thanks for great explaination!!
Yeah, this issue could be fixed after your work(#10464) is done. :)

@ryanbr
Copy link

ryanbr commented Dec 2, 2020

Could we spread the update load for each individual component?

@moritzhaller
Copy link

@simonhong flagging that user-model-installer should be loaded right during startup since if resources are not present users won’t see ads. cc @tmancey

@simonhong
Copy link
Member Author

@ryanbr Not possible now but I think it's worth to try. Currently all components update checks are triggered at once.

@gMan1990
Copy link

By the way: how to disable auto update Brave Browser.app/Contents/Frameworks/Brave Browser Framework.framework/Versions?

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

No branches or pull requests

5 participants