Closed Bug 696900 Opened 13 years ago Closed 13 years ago

Reduce shutdown work in Places when possible

Categories

(Toolkit :: Places, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: mak, Assigned: mak)

Details

Attachments

(1 file, 1 obsolete file)

There are a couple cases we can optimize:

1. On shutdown of a clean database we expire session annotations.  This is conceptually correct, since they should disappear on shutdown, but why doing that even when there are no session annotations? Annotations service may know that, so just let it take care of the expiration when needed.

2. Win7 jumplists shutdown has to check if history has any entry, this is usually a quick path, since Places caches that value, but in some obvious cases the cache wrongly asks to be recalculated, rather than being set to a known value.  By setting the cache in more obvious cases we may avoid more updates, included the jumplists one on shutdown.
Attached patch patch v1.0 (obsolete) — Splinter Review
I'm removing the analyze on shutdown test since it's bogus, it was actually measuring something we don't do anymore, likely fetching a timed expiration.
Attachment #569230 - Flags: review?(dietrich)
https://tbpl.mozilla.org/?tree=Try&rev=6bbb6397af52

Clearly Ts shutdown got even worse...
Asking permission to land with all the patches and point people to bug 696053 for test improvements, I don't feel insane enough to fight windmills.

The only left work on Ts shutdown is finalizing some cached statements, this is the current situation:
http://tinyurl.com/5s43sdu
Comment on attachment 569230 [details] [diff] [review]
patch v1.0

Review of attachment 569230 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/places/nsAnnotationService.cpp
@@ +2022,5 @@
> +
> +NS_IMETHODIMP
> +nsAnnotationService::Observe(nsISupports *aSubject,
> +                        const char *aTopic,
> +                        const PRUnichar *aData)

nit: wonky indent
Attachment #569230 - Flags: review?(dietrich) → review+
Attached patch patch v1.1Splinter Review
Attachment #569230 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/e83437549628
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: