Closed Bug 459299 Opened 11 years ago Closed 11 years ago

nsNavHistory::SetPageTitleInternal is slow

Categories

(Toolkit :: Places, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: sdwilsh, Assigned: sdwilsh)

References

Details

Attachments

(1 file, 2 obsolete files)

In fact, in shark profiles, 66% of the time is spent creating the statement that we use on a lot of page loads.  Ewww...
It also makes a transaction, for no reason...
Attached patch v1.0 (obsolete) — Splinter Review
Attachment #342515 - Flags: review?(dietrich)
Attached patch v1.1 (obsolete) — Splinter Review
forgot to qrefresh to fix a unit test breaking change...
Attachment #342515 - Attachment is obsolete: true
Attachment #342516 - Flags: review?(dietrich)
Attachment #342515 - Flags: review?(dietrich)
Comment on attachment 342516 [details] [diff] [review]
v1.1

>+  mozStorageStatementScoper scoper(mDBSetPlaceTitle);
>   // title
>   if (aTitle.IsVoid())
>-    dbModStatement->BindNullParameter(0);
>-  else
>-    dbModStatement->BindStringParameter(0, StringHead(aTitle, HISTORY_TITLE_LENGTH_MAX));
>+    mDBSetPlaceTitle->BindNullParameter(0);
>+  else
>+    mDBSetPlaceTitle->BindStringParameter(0, StringHead(aTitle, HISTORY_TITLE_LENGTH_MAX));
>   NS_ENSURE_SUCCESS(rv, rv);

need to get rv to check against first

r=me otherwise
Attachment #342516 - Flags: review?(dietrich) → review+
Attached patch v1.2Splinter Review
Addresses review comments
Attachment #342516 - Attachment is obsolete: true
Whiteboard: [has patch][has review]
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has review]
Apparently I already resolved this..

http://hg.mozilla.org/mozilla-central/rev/e04a9b7f832b
You need to log in before you can comment on or make changes to this bug.