Closed Bug 147372 Opened 22 years ago Closed 21 years ago

Use .hidden and .collapsed instead of [GS]etAttribute

Categories

(SeaMonkey :: Composer, defect)

x86
Windows 95
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.3alpha

People

(Reporter: neil, Assigned: cmanske)

Details

(Keywords: perf, polish)

Attachments

(1 file, 2 obsolete files)

I did some perf testing and GetAttribute("hidden") == true is 40% slower than .hidden while removeAttribute("hidden") is 25% slower than .hidden = false also I spotted that CollapseItem() is the same as .collapsed and isn't used anyway :-)
Attached patch Proposed patch (obsolete) — Splinter Review
Oops wrong owner!
Assignee: syd → cmanske
Keywords: patch, perf, polish, review
Setting the attributes and setting the DOM properties is not at all the same thing. Please test interaction with persistence and the like...
bz, persistence only applies to setAttribute(X, "false") which isn't used here.
Actually, no. It applies to any attribute value... I'm not saying it's an issue here, just saying it's worth checking. If the attrs in question are not even being persisted there is definitely no problem. If they are, then we may have to be more careful.
bz: I agree that setAttribute("hidden" or "collapsed", "false") will persist and cannot be replaced with .hidden or .collapsed but neither applies here.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2beta
Comment on attachment 85168 [details] [diff] [review] Proposed patch This has probably bitrotted, right?
neil: yes, I'd say so! Update and I'll review asap.
Target Milestone: mozilla1.2beta → mozilla1.3alpha
Attached patch New patch (except context menu) (obsolete) — Splinter Review
Attachment #85168 - Attachment is obsolete: true
Comment on attachment 106654 [details] [diff] [review] New patch (except context menu) Unlike HideItem, CollapseItem is never used.
Attachment #106654 - Flags: superreview?(alecf)
Attachment #106654 - Flags: review?(cmanske)
Attachment #106655 - Flags: review?(cmanske)
Comment on attachment 106654 [details] [diff] [review] New patch (except context menu) sr=alecf
Attachment #106654 - Flags: superreview?(alecf) → superreview+
Attachment #106654 - Flags: review?(cmanske) → review+
Comment on attachment 106654 [details] [diff] [review] New patch (except context menu) Obsoleting checked-in patch.
Attachment #106654 - Attachment is obsolete: true
Attachment 106655 [details] [diff] got checked in as part of bug 213477.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment on attachment 106655 [details] [diff] [review] Clean up context menu code ...and therefore does not need to be reviewed again.
Attachment #106655 - Flags: review?(cmanske)
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: