XPCOM Shutdown causes lots of GC on startup



Fennec Graveyard
9 years ago
3 years ago


(Reporter: (dormant account), Unassigned)





9 years ago
During normal startup there is only one GC call as I mentioned in bug 466877

However when xpcom causes a restart various GC calls take up to a second of startup on the mobile device.

Comment 1

9 years ago
Specific calls during shutdown:

nsXREDirProvider::DoShutdown() 85ms
nsDOMScriptObjectFactory::Observe 46ms
mozJSComponentLoader::Observe 101ms
nsCycleCollector::Shutdown 226ms <-- this one calls GC twice
mozJSComponentLoader::UnloadModules JS_DestroyContext 125ms
XPCJSContextStack::~XPCJSContextStack JS_DestroyContext 15ms
Fennec should be able to avoid xpcom restart, I hope.

Wish Firefox could too -- hope for 3.2?

(In reply to comment #2)
> Fennec should be able to avoid xpcom restart, I hope.

And still support extensions with XPCOM components the way Firefox does? I don't think it's any easier for us than it is for Firefox (though perhaps more important, granted).

Comment 4

9 years ago
Yeah, restart sucks... but it shouldn't be common: it should only happen once when upgrading the app or installing/uninstall extensions. Is this really something we need to optimize for?

I have some thoughts how we could do XPCOM registration very differently for 3.2 or maybe 3.3 and save a bunch of code, but that's not a short-term thing.

Comment 5

9 years ago
Currently the first fennec startup is roughly 2x slower because of this(around 15s). It results in pretty bad first run experience.

Rob Strong pointed out that firefox deals with this by running with -silent during install.
Did bug 469076 handle this?
This bug has been buried in the graveyard and has not been updated in over 5 years. It is probably safe to assume that it will never be fixed, so resolving as WONTFIX.

[Mass-change filter: graveyard-wontfix-2014-09-24]
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.