Closed
Bug 1137462
Opened 10 years ago
Closed 10 years ago
Improve history database performance
Categories
(Firefox for iOS :: Data Storage, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fxios | + | --- |
People
(Reporter: wesj, Unassigned)
References
Details
Attachments
(1 file)
I haven't spent a lot of time working on performance of history access, but I think we can do a little better:
1.) Inserts into the visits currently have to do a separate lookup in the history table for the site id. We can do that in one command. Some perf testing on desktop shows about a 25% boost (i.e. 1.5 vs 2s to insert 10,000 entries). Seems like an easy win.
2.) Improve the date sorting. We current do our sectioning in the history view by iterating through all the data and looking at dates. There's no reason we can't just do 4 separate queries for it though (it also makes the code a lot cleaner). There's probably overhead to repeating the query 4 times, but it shows about an order of magnitude perf difference for me.
Reporter | ||
Comment 1•10 years ago
|
||
This implements the fixes. I also did some other random cleanup as I went through here (like showing urls' when we don't have titles).
Attachment #8570144 -
Flags: review?(sarentz)
Attachment #8570144 -
Flags: review?(rnewman)
Comment 2•10 years ago
|
||
Comment on attachment 8570144 [details] [review]
Pull request
Added some small comments in the PR. My main concern is that there is too much hardcoded.
Attachment #8570144 -
Flags: review?(sarentz) → review+
Updated•10 years ago
|
Assignee: nobody → wjohnston
Component: General → Data Storage
OS: Mac OS X → iOS 8
Hardware: x86 → All
Comment 3•10 years ago
|
||
Nick mentioned he was taking this over.
See some notes and query plan analysis in <https://etherpad.mozilla.org/rnewman-history-sql>.
Assignee: wjohnston → nalexander
Status: NEW → ASSIGNED
Updated•10 years ago
|
Attachment #8570144 -
Flags: review?(rnewman)
Updated•10 years ago
|
tracking-fennec: --- → ?
Updated•10 years ago
|
tracking-fennec: ? → +
tracking-fxios:
--- → +
Updated•10 years ago
|
Assignee: nalexander → nobody
Status: ASSIGNED → NEW
tracking-fennec: + → ---
Comment 6•10 years ago
|
||
Well?
Reporter | ||
Comment 7•10 years ago
|
||
The first suggestion in the initial comment here is already implemented. The second isn't really needed (we've revamped the in-memory partitioning a few times). I'm closing this as Fixed. We can open a meta somewhere to track general perf improvements, (but I think we have that already somewhere...)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•