Closed
Bug 614787
Opened 14 years ago
Closed 14 years ago
Delay expiration database setup to the first expiration
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla2.0b9
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: mak, Assigned: mak)
Details
(Whiteboard: [fixed-in-places])
Attachments
(1 file, 1 obsolete file)
1.83 KB,
patch
|
sdwilsh
:
review+
|
Details | Diff | Splinter Review |
Creating the temp table is locking us on startup and is not even really useful till the first expiration runs. We can delay that creation to run with the first expiration, async too.
Assignee | ||
Comment 1•14 years ago
|
||
This is blocking Places branch merge, since it's part of our Ts regression.
blocking2.0: --- → ?
Flags: in-testsuite?
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #493225 -
Flags: review?(dietrich)
Assignee | ||
Comment 3•14 years ago
|
||
note: expiration tests are already testing the existence of the table, thus this will be tested.
Comment 4•14 years ago
|
||
(In reply to comment #0)
> Creating the temp table is locking us on startup and is not even really useful
> till the first expiration runs. We can delay that creation to run with the
> first expiration, async too.
Do we have data showing an improvement in Ts if we disable this?
Assignee | ||
Comment 5•14 years ago
|
||
I have done a bunch of measures on try and the combination of this patch and the patch in Bug 614790 gave me the best results.
I can't give numbers for just this one since Bug 614790 covers any improvement. Btw this is work we absolutely don't need to do on startup and for a bunch of minutes after startup, so I can't really think to any reason to not do it.
Assignee | ||
Comment 6•14 years ago
|
||
Actually, we could get a better measure of the effect on branch, since this is useless work I think we would want this patch regardless and we won't need backouts or stuff like that.
Comment 7•14 years ago
|
||
Comment on attachment 493225 [details] [diff] [review]
patch v1.0
r=me. existing tests should be enough here, correct?
Attachment #493225 -
Flags: review?(dietrich) → review+
Updated•14 years ago
|
blocking2.0: ? → betaN+
Comment 8•14 years ago
|
||
Comment on attachment 493225 [details] [diff] [review]
patch v1.0
>+ // The first expiration will also create the notifications temp table.
>+ let createTempTableStmt = this._createTempTableStmt;
>+ if (createTempTableStmt) {
>+ boundStatements.push(createTempTableStmt);
>+ }
When would this fail?
Assignee | ||
Comment 9•14 years ago
|
||
(In reply to comment #8)
> Comment on attachment 493225 [details] [diff] [review]
> patch v1.0
>
> >+ // The first expiration will also create the notifications temp table.
> >+ let createTempTableStmt = this._createTempTableStmt;
> >+ if (createTempTableStmt) {
> >+ boundStatements.push(createTempTableStmt);
> >+ }
> When would this fail?
this doesn't fail, the getter is built so that only the first invocation returns something, next ones will return null, indeed only the first expiration has to create the temp table.
Comment 10•14 years ago
|
||
(In reply to comment #9)
> this doesn't fail, the getter is built so that only the first invocation
> returns something, next ones will return null, indeed only the first expiration
> has to create the temp table.
Oh, right. This indirection is a bit confusing. Could we just create the temp table in our db getter like nsPlacesAutoComplete does?
Assignee | ||
Comment 11•14 years ago
|
||
(In reply to comment #10)
> Oh, right. This indirection is a bit confusing. Could we just create the temp
> table in our db getter like nsPlacesAutoComplete does?
we could, but since we already fire a bunch of write statements in a transaction, it was easier to just add one rather than adding more work on sqlite. If you think the hit is uninteresting I can do a separate executeAsync in the db getter.
Comment 12•14 years ago
|
||
(In reply to comment #11)
> we could, but since we already fire a bunch of write statements in a
> transaction, it was easier to just add one rather than adding more work on
> sqlite. If you think the hit is uninteresting I can do a separate executeAsync
> in the db getter.
It won't be in the transaction, but I don't think it really matters. It should only be changing in-memory data structures for SQLite. I think the code clarity will make it worthwhile though.
Assignee | ||
Comment 13•14 years ago
|
||
ok, based on comment 10. I'm not going to re-ask review, since it's mostly on the form rather than the content.
Attachment #493225 -
Attachment is obsolete: true
Comment 14•14 years ago
|
||
Comment on attachment 493753 [details] [diff] [review]
patch v1.1
r=sdwilsh
Attachment #493753 -
Flags: review+
Assignee | ||
Comment 15•14 years ago
|
||
Flags: in-testsuite? → in-testsuite+
Whiteboard: [fixed-in-places]
Assignee | ||
Comment 16•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b9
You need to log in
before you can comment on or make changes to this bug.
Description
•