slowdown in about:config if filter term starts with *

RESOLVED FIXED in mozilla1.9alpha8

Status

()

--
minor
RESOLVED FIXED
13 years ago
12 years ago

People

(Reporter: zeniko, Assigned: zeniko)

Tracking

Trunk
mozilla1.9alpha8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060112 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060112 Firefox/1.5

Since the landing of the patch to bug 213832, filter strings starting with * unnecessarily slow down the whole browser. While it's easy to work around this problem (simply don't search for anything starting with *), the slowing down could still very cheaply be avoided - at least for all those who don't immediately get the new special meaning of *.

Reproducible: Always

Steps to Reproduce:
1. Open about:config
2. Filter for "*;false" (type slowly)

Actual Results:  
The browser hangs for several seconds.

Expected Results:  
No hanging.
(Assignee)

Comment 1

13 years ago
Created attachment 208782 [details] [diff] [review]
ignore leading '*'s
Attachment #208782 - Flags: first-review?(mconnor)
Assignee: nobody → zeniko
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 2

12 years ago
Comment on attachment 208782 [details] [diff] [review]
ignore leading '*'s

Gavin: Is this anything we might want?
Attachment #208782 - Flags: first-review?(mconnor) → first-review?(gavin.sharp)

Updated

12 years ago
Attachment #208782 - Flags: first-review?(gavin.sharp) → review?(gavin.sharp)
Comment on attachment 208782 [details] [diff] [review]
ignore leading '*'s

Sorry for the delay. I'm very ambivalent about this patch... I don't think about:config performance for edge cases like these are really worth worrying about :)
Attachment #208782 - Flags: review?(gavin.sharp) → review+
Keywords: checkin-needed
OS: Windows XP → All
Hardware: PC → All
Version: unspecified → Trunk
Comment on attachment 208782 [details] [diff] [review]
ignore leading '*'s

>+      rex = RegExp(substring.replace(/([^* \w])/g, "\\$1")
>+        .replace(/^[*]+/, "").replace(/[*]+/g, ".*"), "i");

This should be more straightforward and is theoretically (doesn't matter, really) faster:

>      rex = RegExp(substring.replace(/([^* \w])/g, "\\$1")
>                            .replace(/^\*+/, "")
>                            .replace(/\*+/g, ".*"), "i");
(Assignee)

Comment 5

12 years ago
Created attachment 275233 [details] [diff] [review]
for check-in
Attachment #208782 - Attachment is obsolete: true
(Assignee)

Updated

12 years ago
Attachment #275233 - Flags: approval1.9?
Comment on attachment 275233 [details] [diff] [review]
for check-in

You don't need approval for front end patches like this one, at this stage.
Attachment #275233 - Flags: approval1.9?
mozilla/toolkit/components/viewconfig/content/config.js 	1.24
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M8
You need to log in before you can comment on or make changes to this bug.