Closed Bug 338180 Opened 19 years ago Closed 19 years ago

Make tabbrowser's ".browsers" property faster

Categories

(SeaMonkey :: UI Design, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: csthomas, Assigned: csthomas)

References

()

Details

(Keywords: fixed-seamonkey1.1a)

Attachments

(1 file, 2 obsolete files)

Neil mentioned on IRC that we access this.browsers in loops, and currently build the array each time in the getter. Jag seems to think we should cache the array after it's built.
Attached patch better patch (obsolete) — Splinter Review
I left out a small detail in the previous version.
Attachment #222237 - Attachment is obsolete: true
Comment on attachment 222239 [details] [diff] [review] better patch I think I'd prefer if (!this._browsers) { ... this._browsers = browsers; } return this._browsers; but other than that, yeah, that should do the trick.
Assignee: jag → cst
Attachment #222239 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #222351 - Flags: review?(jag)
Comment on attachment 222351 [details] [diff] [review] single exit point <jag> r+sr=jag then <jag> Oooh, get Neil's sr <CTho> NeilAway: the SR question was about bug 338180 <NeilAway> CTho: but if it's the .browser cache, sr=me
Attachment #222351 - Flags: superreview+
Attachment #222351 - Flags: review?(jag)
Attachment #222351 - Flags: review+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Attachment #222351 - Flags: approval-seamonkey1.1a?
Comment on attachment 222351 [details] [diff] [review] single exit point a=me for SeaMonkey 1.1
Attachment #222351 - Flags: approval-seamonkey1.1a? → approval-seamonkey1.1a+
Would this apply to FF? Would it improve perf? ~B
(In reply to comment #8) > Would this apply to FF? Yes > Would it improve perf? Probably not enough to notice, but it should still be done.
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: