If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

possible performance improvement: hard-code the richlistitems in autocomplete.xul

RESOLVED WONTFIX

Status

()

Firefox
Address Bar
RESOLVED WONTFIX
10 years ago
2 years ago

People

(Reporter: (not reading, please use seth@sspitzer.org instead), Unassigned)

Tracking

({perf})

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

possible performance improvement:  hard code the richlistitems in autocomplete.xul

another suggestion from vlad.

Right now, in _appendCurrentResult() in autocomplete.xml, when the user first starts typing in the url bar the very first time (for each window), we will create the richlistitems:

979             if (this._currentIndex < existingItemsCount) {
980               // re-use the existing item
981               item = this.richlistbox.childNodes[this._currentIndex];
982             }
983             else {
984               // need to create a new item
985               item = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "richlistitem");
986             }

by default, browser.urlbar.maxRichResults is currently 25 so if in autocomplete.xml our content for the richlistbox had 25 richlistitems, we wouldn't pay a performance price when the user starts typing

instead we'd pay it on Ts / Txul, though, I believe, but keep in mind that the panel is hidden.

note, maxRows is currently 10 (http://lxr.mozilla.org/seamonkey/source/browser/base/content/browser.xul#264)
Keywords: perf
Summary: possible performance improvement: hard code the richlistitems in autocomplete.xul → possible performance improvement: hard-code the richlistitems in autocomplete.xul
I don't think it's worth to micromanage perf at this level, it only happens once per window, most users have just 1 window and it's important that it appears as fast as possible. Moving the cost to Ts or TXul wouldm't be wise.
Morever we're at 12 results and will very likely reduce to 8 soon. The cost is very contained.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.