Closed
Bug 570842
Opened 13 years ago
Closed 13 years ago
Pasting large strings into the location bar hangs Camino for ~5m at 100% CPU
Categories
(Camino Graveyard :: Location Bar & Autocomplete, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino2.1
People
(Reporter: alqahira, Assigned: stuart.morgan+bugzilla)
References
()
Details
(Keywords: hang, perf)
Attachments
(2 files)
37.85 KB,
text/plain
|
Details | |
4.05 KB,
patch
|
mikepinkerton
:
superreview+
alqahira
:
feedback+
|
Details | Diff | Splinter Review |
I accidentally pasted the contents of ad_blocking.css into the location bar, and Camino essentially hung for 5min (it was still vaguely responsive, processing an event every minute or so), taking 100% of CPU. Even though I cleared the location bar string immediately (with Esc) when I saw what I'd pasted, and the location bar did visibly clear, the autocomplete work continued for that ~5mins. This is trivial to reproduce if you have some bookmarks and history (I have about 1500 of the former and 14 days/6072 of the latter), but it won't reproduce with no history/default bookmarks. There are probably good arguments for truncating pastes into the location bar (even bookmarklets have better ways of being triggered), so that seems like a reasonable first point of attack on this bug (we already have code to smart-strip spaces on location-bar paste, so presumably this check could just go in there). I assume this is also a regression from 2.0.x, but I'd have to figure out how to get a useful history into there to test. I'm not sure whether this really needs to block a1 (it's certainly a pain, but I don't know how easy it is to get confused between having an entire CSS file and a URL on the clipboard :P ), but if we can significantly æmeliorate it easily by just truncating pastes, that sounds like low-hanging fruit. The "autocomplete doesn't realize when location bar contents change and keeps working anyway" is an ongoing problem; there's evidence of it in several of my other location bar bugs.
Flags: camino2.1a1?
Assignee | ||
Comment 1•13 years ago
|
||
This does two things: 1) Fixes the esc-doesn't-cancel-search bug 2) Bypasses evaluateWithObject:, which is where the sample is showing the time spent, when the search string is too long for a match to be possible. I'm hoping 2 is enough to fix this since it's more precise than truncating at an arbitrary point, but I don't have a good history base to test with. Can you see if this makes the problem go away (even without hitting esc)? If not, I'll add some truncation.
Assignee: nobody → stuart.morgan+bugzilla
Status: NEW → ASSIGNED
Attachment #452570 -
Flags: feedback?(alqahira)
Reporter | ||
Comment 2•13 years ago
|
||
Comment on attachment 452570 [details] [diff] [review] fix? f+! It's like butter :-) Can I say you're my hero?
Attachment #452570 -
Flags: feedback?(alqahira) → feedback+
Reporter | ||
Updated•13 years ago
|
Assignee | ||
Updated•13 years ago
|
Attachment #452570 -
Flags: superreview?(mikepinkerton)
Comment 3•13 years ago
|
||
Comment on attachment 452570 [details] [diff] [review] fix? sr=pink
Attachment #452570 -
Flags: superreview?(mikepinkerton) → superreview+
Assignee | ||
Comment 4•13 years ago
|
||
Landed http://hg.mozilla.org/camino/rev/312e30c5613f
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•13 years ago
|
Flags: camino2.1a1? → camino2.1a1+
You need to log in
before you can comment on or make changes to this bug.
Description
•