Thousands of extensions in one user profile causes Chromium to operate slowly

59 views
Skip to first unread message

Ivan Khrulev

unread,
Oct 1, 2012, 9:07:47 AM10/1/12
to chromium...@chromium.org

Hello all,

Our team is currently designing an application platform that relies on possibility to handle (not to run) several thousands of applications simultaneously. Maybe the Chromium project isn't the proper choice for such task, but for now it's most suitable for us.

So we performed some measurements and noticed that the time required for the platform to start raises close-to-linear when huge amount of applications are installed in user profile. Additionally, it takes more time to launch a specific application, and that time also linearly depends on number of installed applications. (Unfortunately, we don't yet know whether it depends on number of *enabled* applications or not.) In some tests we use custom start page to override chrome://newtab in order not to put entire list of apps into DOM. After being launched, each application works independently on number of other applications (at least, it seems like that).

It also seems that hard disk doesn't matter: even when that huge user profile is located on a RAMdisk, all timings are exactly the same. We have simple hosted non-background apps with some JS and CSS, any of them has its own public key in its manifest.json. My early assumption is that loading procedure highly depends on CPU because it, let's say, have to verify all application keys and thus have to compute thousands of SHA-256 hashes, but I'm not sure.

I realize that probably the best tip in this situation is "if it doesn't work this way - don't use it this way", but I'm asking for any advice: what we can do to speed up the launch of an extension?

Nico Weber

unread,
Oct 1, 2012, 9:09:53 AM10/1/12
to ch...@chge.ru, chromium...@chromium.org
Have you tried using a profiler? Where is the time spent?

Nico

Ivan Khrulev

unread,
Feb 4, 2013, 8:22:40 AM2/4/13
to chromium...@chromium.org, ch...@chge.ru
After a huge delay we're back to this problem and seemed to solve it in some way. There were 2 main bottlenecks: 1) blacklist of extensions and 2) transferring of app ID to the renderer process instead of app data per se.

Removing of 1st bottleneck allows us to start browser with thousands of installed and enabled extensions without significant delays even on embedded systems. After some refactoring regarding 2nd bottleneck we can launch each of those applications (not all, but one-two simultaneously) in acceptable time.

Our average hardware is 1GHz Celeron with 512 MB of RAM. Browser (26.0.14.0 r180000) with 3000 apps starts in 20-30 s, while app is launched in 1-2 s.

Something could be outdated, but we can upload fresh changes for those who interested.

Could you please give us some advice regarding this changes? Could they lead us to serious problems later? Please note: this patches reduce functionality, but it's reasonable for us.

Nico Weber

unread,
Feb 4, 2013, 1:46:27 PM2/4/13
to ch...@chge.ru, chromium...@chromium.org
Hi Ivan,

On Mon, Feb 4, 2013 at 5:22 AM, Ivan Khrulev <ch...@chge.ru> wrote:
> After a huge delay we're back to this problem and seemed to solve it in some
> way. There were 2 main bottlenecks: 1) blacklist of extensions and 2)
> transferring of app ID to the renderer process instead of app data per se.

patch set 2 looks like it might be mergable (without all these VLOG
lines), but extension blacklisting can't just be deleted. Maybe it can
be implemented in a faster way (like, process them in patches instead
of one task per extension for example).

Your best way forward:

1. File an issue about the problem you're solving at
http://crbug.com/new . Include repro steps ("have 10000 extensions"),
data you've collected ("most time goes into passing around extension
data and processing blacklisting").
2. Follow http://dev.chromium.org/developers/contributing-code to send
your patches. miket@chromium or mpcomplete@chromium are probably good
people for the "reviewer" line.

Thanks for working on this!

Nico

>
> Removing of 1st bottleneck allows us to start browser with thousands of
> installed and enabled extensions without significant delays even on embedded
> systems. After some refactoring regarding 2nd bottleneck we can launch each
> of those applications (not all, but one-two simultaneously) in acceptable
> time.
>
> Our average hardware is 1GHz Celeron with 512 MB of RAM. Browser (26.0.14.0
> r180000) with 3000 apps starts in 20-30 s, while app is launched in 1-2 s.
>
> My colleague has posted some info and patches here:
> https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/d75EjIWx3E4/uA0MiaZOpyoJ
> Something could be outdated, but we can upload fresh changes for those who
> interested.
>
> Could you please give us some advice regarding this changes? Could they lead
> us to serious problems later? Please note: this patches reduce
> functionality, but it's reasonable for us.
>
> --
> Chromium Discussion mailing list: chromium...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-discuss
Reply all
Reply to author
Forward
0 new messages