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)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: vladan, Assigned: vladan)

References

Details

(Keywords: perf)

Attachments

(1 file)

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.
Attachment #571814 - Attachment is patch: true
Assignee: nobody → vdjeric
Blocks: 691268
Keywords: perf
Attachment #571814 - Flags: review?(dtownsend)
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)
(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
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).
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).
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?
Ah, nevermind, I see that that's in bug 691268's patch.
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
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)
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.

Attachment

General

Created:
Updated:
Size: