Closed Bug 145373 Opened 23 years ago Closed 23 years ago

Change match and search abuse to use test instead

Categories

(SeaMonkey :: Composer, defect)

x86
Windows 98
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.2alpha

People

(Reporter: neil, Assigned: cmanske)

Details

(Keywords: perf)

Attachments

(1 file, 3 obsolete files)

Attached patch Proposed patch (obsolete) — Splinter Review
Morphing this bug because it was hiding a bigger error.
Assignee: syd → cmanske
Summary: Inline trivial function StripPxUnit → Change match and search abuse to use test instead
Attachment #84119 - Attachment is obsolete: true
The point of these patches is that in most cases match and/or search is merely being used to test for the presence of a substring. While there are other cases where the substrings or their positions are important my patches convert the simpler cases to use the test function instead. This should be more logical and in the case of match also more efficient as match returns an array. Note that I am not immune from abusing match in this way :-)
Keywords: patch, perf, review
Neil: let's simplify and supply one patch with all the changes. Thanks.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2alpha
Attached patch Combined patchSplinter Review
Attachment #89797 - Attachment is obsolete: true
Attachment #89799 - Attachment is obsolete: true
Comment on attachment 91493 [details] [diff] [review] Combined patch r=cmanske I agree that this is all more efficient.
Attachment #91493 - Flags: review+
Keywords: nsbeta1
Whiteboard: [FIX IN HAND]need sr=
Comment on attachment 91493 [details] [diff] [review] Combined patch sr=alecf
Attachment #91493 - Flags: superreview+
Whiteboard: [FIX IN HAND]need sr= → [FIX IN HAND]
checked into 1.2 trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Keywords: patch, review
Resolution: --- → FIXED
Whiteboard: [FIX IN HAND]
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: