Closed
Bug 348171
Opened 19 years ago
Closed 19 years ago
Delete (backspace) is extremely slow in textareas in recent nightlies
Categories
(Core :: Spelling checker, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: alqahira, Assigned: brettw)
Details
(Keywords: fixed1.8.1, perf, regression)
Attachments
(1 file)
|
1.15 KB,
patch
|
bryner
:
review+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
Sometime in the last week or so, deleting text in textareas has become very slow on the 1.8branch, although not consistently. It seems to be worse if you have a bunch of text (e.g., a long paragraph).
I haven't been able to get nightlies on a regular basis for a week or so (and still can't), so I can't tell when it might have regressed, or if it's Camino-only, or anything. Filing UNCO so that I can get a little help in figuring out those things.
There are also some cases where normal typing and editing are also very slow, but they are even harder to pin down.
| Reporter | ||
Comment 1•19 years ago
|
||
This reminds me of bug 272954, which is never a good feeling :(
Keywords: qawanted
| Reporter | ||
Comment 2•19 years ago
|
||
I think this is spell-check related; when I turn off spell-checking (and reload the page, which is required, for some reason), I don't notice any lag at all when deleting, even with a long paragraph of text.
I played with this in QuartzDebug a little bit, and I discovered some surprising things:
1) Deleting (aka backspace), even if I'm deleting the *last character in a paragraph*, forces us to redraw the entire paragraph (e.g., the entire pgh flashes red when "identical updates" is on).
This seems to happen whether spell-check is on or off, so it's not part of this bug--and not how spell-checking is slowing deleting down--but perhaps is an area for improvement. (By contrast, when typing normally at the end of a paragraph, we only redraw the current and previous line.)
2) With spellcheck on, when deleting at the end of one paragraph, not only do we redraw all of that paragraph, but we also redraw any line in any other paragraph which has an underlined word--twice, it looks like. This doesn't happen with spellcheck off (i.e., flipping the pref and reloading the page), obviously, since there are no underlined words.
This is perhaps part of the slowdown; why are they being redrawn if no text in/near them is being changed? Is the spell-checker re-checking the entire textarea on any text change? If so, that could definitely explain the slowdowns.
Forgot to mention initially that this is in today's 18branch nightly, 2006080901 (1.0+)--I got current today, but my last one was roughly a week old.
cc'ing some folks now that I have a slightly better idea of what's going on (and because we've reached the extent of my perf analysis knowledge!)
Severity: normal → major
Comment 3•19 years ago
|
||
This regressed between the 2006-08-04-04 nightly and the 2006-08-05-06 nightly.
http://tinyurl.com/g5vzt
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 4•19 years ago
|
||
Er, correct bonsai query for that regression range: http://tinyurl.com/klask
There are 3 possibles here, bug 347286, bug 344560 and bug 345112.
We looked at this a little bit on irc, and reverting the number of words back down to 250 (e.g., reverting bug 347286) helps with the lag a little bit, but it's still noticeably slower than before. Based on the behavior I seemed to observe in QuartzDebug, I'd guess that bug 345112 is the culprit.
Flags: blocking1.8.1?
Keywords: qawanted
Comment 5•19 years ago
|
||
Can someone Shark this and collect some data?
| Reporter | ||
Comment 6•19 years ago
|
||
I have no idea how to use Shark :(
Comment 7•19 years ago
|
||
I did some deletions in the middle of a bunch of text. In 08/04, it's basically all just DOM deletion events and text redraw, as expected; spellcheck never really shows up. In 08/05, with the same text, it looks like this, inside PL_HandleEvent (which also never shows up in the 08/04 samples)
64.7 NSGetModule
64.6 NSGetModule
31.3 nsEditorSpellCheck::CheckCurrentWordNoSuggest
22.3 NSGetModule
13.1 nsTypedSelection::RemoveRange
...
All the NSGetModule stuff is in libspellchecker. There's no question that the spellcheck code is being called way, way more often in 08/05.
Comment 8•19 years ago
|
||
Brett - can you take a look.
Assignee: nobody → brettw
Flags: blocking1.8.1? → blocking1.8.1+
| Assignee | ||
Comment 9•19 years ago
|
||
I see this on Linux too. When you press backspace, something is getting confused and we're checking from the cursor to the end of the document.
OS: Mac OS X 10.2 → All
Product: Camino → Core
Hardware: Macintosh → All
| Assignee | ||
Updated•19 years ago
|
Component: General → Spelling checker
QA Contact: general → spelling-checker
| Assignee | ||
Comment 10•19 years ago
|
||
Trivial fix. We were returning early from the function before actually finishing what we were supposed to. I don't see any reason to hold off on branch checkin.
Attachment #233592 -
Flags: review?(bryner)
Attachment #233592 -
Flags: approval1.8.1?
Updated•19 years ago
|
Attachment #233592 -
Flags: review?(bryner) → review+
| Assignee | ||
Comment 11•19 years ago
|
||
Fixed on trunk. Leaving open for branch checkin.
Comment 12•19 years ago
|
||
Comment on attachment 233592 [details] [diff] [review]
Patch
a=beltzner on behalf of drivers for the mozilla 181 branch
Attachment #233592 -
Flags: approval1.8.1? → approval1.8.1+
| Assignee | ||
Comment 13•19 years ago
|
||
Fixed on branch.
You need to log in
before you can comment on or make changes to this bug.
Description
•