|
|
Created:
8 years, 3 months ago by jeremy Modified:
8 years ago CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionExtensionService: Delay non-critical IO until after startup has finished.
Delay the calls to CheckForExternalUpdates() and GarbageCollectExtensions() until onload fires for the first frame to reduce IO at startup.
For newly created profiles we don't delay CheckForExternalUpdates().
BUG=136623
TEST=All unit tests should pass, external extension updates should continue to work.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=170960
Patch Set 1 #Patch Set 2 : Improve comments. #Patch Set 3 : Address review comments #Patch Set 4 : Update patch #Patch Set 5 : Fix ExtensionServiceTest.UpdateOnStartup #Patch Set 6 : All unit tests now pass (hopefuly) #
Total comments: 1
Patch Set 7 : ResetExternalUpdateCheckGuard() -> ResetExternalUpdateCheckGuardForTests() #
Messages
Total messages: 32 (0 generated)
Hi Antony, This CL implements the change we discussed. CheckForExternalUpdates() will notably be called twice for newly created profiles, is that an issue? Thanks!, Jeremy
Overall approach seems fine, so LGTM. I don't think it's a huge deal to call CheckForExternalUpdates twice on new profiles, but it would be nice to avoid it. Maybe just add a boolean flag member variable like |checked_for_external_updates_| or something? Alternatively, could you just perform the same "is this a new profile?" check? Looks like you might need to arrange to have that notification sent to fix a couple of tests that likely are expecting the current behavior. Also nit on CL description - you say "...until unload fires..." but it's clear from the code changes you mean "...until *onload* fires...".
Sorry, I just thought of a potential problem with the approach: external extensions can often have their source .crx files somewhere in the local filesystem, and we probably want to install them relatively quickly even if there is no network connection. In the case where the network is unavailable, will we not get an onload event firing if the set of startup pages are all internet resources that get connection errors? Or do the error pages generate that onload notification?
Yes, I've just double-checked, the error pages do indeed trigger NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME .
On 2012/09/05 08:33:05, jeremy wrote: > Yes, I've just double-checked, the error pages do indeed trigger > NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME . Ok, I suppose then the only minor issue is that if all the startup pages happened to be very slow to load and none of them completed in a resonable time frame, then external extension update checks would be delayed. That's probably not a big deal though, so I don't know that it's worth the complexity of doing something like setting up a timer to alleviate this (and indeed, if a more generic "run non-essential startup tasks after some delay" mechanism is implemented then we'd just want to hook into that anyway).
Thanks! All review comments addressed, all unit tests pass.
LGTM
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/10914076/1002
Try job failure for 10914076-1002 (retry) on mac_rel for step "sync_integration_tests". It's a second try, previously, step "sync_integration_tests" failed. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&nu...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/10914076/1002
Try job failure for 10914076-1002 (retry) (retry) on linux_rel for step "sync_integration_tests". It's a second try, previously, step "sync_integration_tests" failed. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/10914076/25001
Retried try job too often for step(s) sync_integration_tests
I'll be trying to repro the integration test failure.
On 2012/11/14 20:14:18, akalin wrote: > I'll be trying to repro the integration test failure. Hunh, still can't repro locally. Tried Debug/Release x Linux/OS X. I guess I'll see if I can upload my own patch and repro the trybot failures. Then I'll add logging
On 2012/11/14 23:07:47, akalin wrote: > On 2012/11/14 20:14:18, akalin wrote: > > I'll be trying to repro the integration test failure. > > Hunh, still can't repro locally. Tried Debug/Release x Linux/OS X. > > I guess I'll see if I can upload my own patch and repro the trybot failures. > Then I'll add logging Okay, I found the problem (finally). I will file a bug.
On 2012/11/15 05:32:48, akalin wrote: > bug: https://code.google.com/p/chromium/issues/detail?id=161203 Landed my patch in r168142 -- see if syncing after that fixes the failures!
On 2012/11/16 18:04:59, akalin wrote: > On 2012/11/15 05:32:48, akalin wrote: > > bug: https://code.google.com/p/chromium/issues/detail?id=161203 > > Landed my patch in r168142 -- see if syncing after that fixes the failures! Nevermind, I have to roll back that patch. See 161581
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/10914076/25001
Retried try job too often on linux_rel for step(s) unit_tests
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/10914076/25001
Retried try job too often on linux_chromeos for step(s) unit_tests
On 2012/11/28 21:46:41, I haz the power (commit-bot) wrote: > Retried try job too often on linux_chromeos for step(s) unit_tests Test failures are ExtensionServiceTest.ExternalInstallGlobalError -- possibly a legit (but separate) failure?
Antony: I've changed the approach slightly to not fire fake notifications in the updated test files, could you take another look please?
LGTM https://chromiumcodereview.appspot.com/10914076/diff/40003/chrome/browser/ext... File chrome/browser/extensions/extension_service.h (right): https://chromiumcodereview.appspot.com/10914076/diff/40003/chrome/browser/ext... chrome/browser/extensions/extension_service.h:386: void ResetExternalUpdateCheckGuard() { optional suggestion: consider adding "ForTests" or something along those lines to this name
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/10914076/40003
Step "update" is always a major failure. Look at the try server FAQ for more details.
On 2012/12/03 19:26:55, I haz the power (commit-bot) wrote: > Step "update" is always a major failure. > Look at the try server FAQ for more details. I hate to do this, but can you hold off on this again? My 2nd attempt actually introduced yet another regression ( https://code.google.com/p/chromium/issues/detail?id=163706 ) that's not easy to fix, so I will try to revert and try again. :/
Okay, my third attempt landed as 170880. This time I think it's sticking. :)
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/10914076/32005
Message was sent while issue was closed.
Change committed as 170960 |