Closed Bug 320183 Opened 19 years ago Closed 17 years ago

Optimize statement compilation

Categories

(Firefox :: Bookmarks & History, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Firefox 3 beta2

People

(Reporter: brettw, Assigned: dietrich)

Details

(Keywords: perf)

Attachments

(1 file)

Some common code paths such as adding a URI use non-precompiled database statements. We should ensure that every statement used on common code paths have been precompiled.
Priority: -- → P3
Assignee: nobody → brettw
Severity: normal → trivial
Target Milestone: --- → Firefox 2 beta1
The history system looks pretty good in this respect (at least when my patch to bug 325665 lands). I noticed the bookmark system could use some more precompiled statements. Probably the stuff for inserting new bookmarks and adjusting indices should all use precompiled statements. The deletion and folder manipulation is probably less critical. We don't want to precompile stuff that is seldom used.
Assignee: brettw → bryner
Assignee: bryner → nobody
Target Milestone: Firefox 2 beta1 → ---
This may negatively affect Ts in a very small way for normal startups. However it will improve perf generally for each of these APIs, as we won't be compiling the statements at call-time. It should also improve performance of bookmarks import and folder sorting, where we call these APIs hundreds or thousands of times in succession.
Assignee: nobody → dietrich
Status: NEW → ASSIGNED
Attachment #287697 - Flags: review?(sspitzer)
Comment on attachment 287697 [details] [diff] [review]
for bookmarks service

r=sspitzer
Attachment #287697 - Flags: review?(sspitzer) → review+
Keywords: perf
Target Milestone: --- → Firefox 3 M10
Comment on attachment 287697 [details] [diff] [review]
for bookmarks service

drivers: see comment #2
Attachment #287697 - Flags: approval1.9?
from irc:

<dietrich> import for me involves 1000+ items, which means we're creating,
compiling and destroying 2000+ statements

So, this is a good fix for improving performance on first time running Fx 3
(from Fx 2)

About impacting Ts, I asked dietrich if we call ::Init() before the browser
shows up, or if we call it from delayedStartup().  He reminded me that we do,
from _initPlaces(), in nsBrowserGlue.js

(Even still, we are both doubtful that compiling these statements is going to
move the Ts needle at all.)
Comment on attachment 287697 [details] [diff] [review]
for bookmarks service

a=release drivers
Attachment #287697 - Flags: approval1.9? → approval1.9+
Checking in toolkit/components/places/src/nsNavBookmarks.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavBookmarks.cpp,v  <--  nsNavBookmarks.cpp
new revision: 1.126; previous revision: 1.125
done
Checking in toolkit/components/places/src/nsNavBookmarks.h;
/cvsroot/mozilla/toolkit/components/places/src/nsNavBookmarks.h,v  <--  nsNavBookmarks.h
new revision: 1.48; previous revision: 1.47
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: