Closed
Bug 699621
Opened 14 years ago
Closed 13 years ago
Unpack search.sqlite from omni.jar when profile is created
Categories
(Toolkit :: Find Toolbar, defect)
Toolkit
Find Toolbar
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: vladan, Assigned: vladan)
References
Details
(Keywords: perf)
Attachments
(1 file)
2.75 KB,
patch
|
Details | Diff | Splinter Review |
To improve first run performance, we will be unpacking pre-created SQLite databases from omni.jar on profile initialization (see bug 691268).
This change extracts search.sqlite from omni.jar when the database doesn't exist. The extracted DB contains the DB schema but no rows. If extraction fails for whatever reason, an error is logged and the DB is created from scratch as before.
Assignee | ||
Updated•14 years ago
|
Attachment #571814 -
Attachment is patch: true
Assignee | ||
Updated•14 years ago
|
Assignee | ||
Updated•14 years ago
|
Attachment #571814 -
Flags: review?(dtownsend)
Comment 1•14 years ago
|
||
Comment on attachment 571814 [details] [diff] [review]
Code for unpacking the DB when profile is created
Is there a reason we're not using the zipreader cache for omnijar rather than individual (presumably expensive to init) zipreaders?
Attachment #571814 -
Flags: review?(dtownsend) → review?(gavin.sharp)
Assignee | ||
Comment 2•14 years ago
|
||
(In reply to Dave Townsend (:Mossop) from comment #1)
> Comment on attachment 571814 [details] [diff] [review] [diff] [details] [review]
> Code for unpacking the DB when profile is created
>
> Is there a reason we're not using the zipreader cache for omnijar rather
> than individual (presumably expensive to init) zipreaders?
Are ZipReaders expensive to initialize? The omni.jar archive is only ever opened once.. The only potentially expensive ZipReader constructor operation is initializing the mutex (nsJAR::mLock), and that doesn't seem to be particularly expensive
Comment 3•14 years ago
|
||
That won't work for non-omni.jar builds. You should just use resource://gre/ urls (which also will reuse the already opened omnijar's ZipArchive).
Comment 4•14 years ago
|
||
Also note your patch won't work on mobile builds where the omni.jar is the apk (and soon it will even be a jar-in-the-apk).
Comment 5•14 years ago
|
||
I'm a bit confused, doesn't this also need a "package an empty search.sqlite in omni.jar" part? Is that in some other bug?
Comment 6•14 years ago
|
||
Ah, nevermind, I see that that's in bug 691268's patch.
Comment 7•14 years ago
|
||
Vladan, for bug 699856, I am currently fully getting rid of search.sqlite. So, if you are not done yet, do not spend too much time on this bug.
See Also: → jsonSearchSvc
Updated•14 years ago
|
Depends on: jsonSearchSvc
Comment 8•14 years ago
|
||
Comment on attachment 571814 [details] [diff] [review]
Code for unpacking the DB when profile is created
Given David and Mike's comments, I don't think we want to take this now. We can revisit if the search.sqlite-ectomy fails :)
Attachment #571814 -
Flags: review?(gavin.sharp)
Comment 9•13 years ago
|
||
bug 691268 is WONTFIX, and search.sqlite no longer exists (bug 699856)
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•