fix_macosx_stack is very slow when given a long line of hyphens

RESOLVED FIXED

Status

()

Core
XPCOM
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Jesse Ruderman, Assigned: Jesse Ruderman)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

8 years ago
Created attachment 430501 [details] [diff] [review]
patch

The regexp
  ^([ \|0-9-]*)(.*) ?\[...
is very slow.

I'm guessing this is due to regexp backtracking.  It's slow enough that my scripts think Firefox is hanging when it's not.

Here's one possible fix.  It seems to fix the perf issue, and balance trees still look good.
Attachment #430501 - Flags: review?(dbaron)
(Assignee)

Comment 1

8 years ago
Created attachment 430502 [details]
testing script
Comment on attachment 430501 [details] [diff] [review]
patch

r=dbaron
Attachment #430501 - Flags: review?(dbaron) → review+
(Assignee)

Updated

8 years ago
Assignee: nobody → jruderman
(Assignee)

Comment 3

8 years ago
http://hg.mozilla.org/mozilla-central/rev/659d517acd61
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.