Closed Bug 249561 Opened 21 years ago Closed 18 years ago

textarea with lots of text becomes slow to edit

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: chris, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 Every additional key you press inside of a textarea on Firefox/Windows takes more time to display than the previous key. When you get more than a few thousand characters, the effect really starts to become noticable on my 2 GHz machine. This doesn't happen with my linux copy. Reproducible: Always Steps to Reproduce: 1. Open a web page with a texarea in it. 2. Copy a large amount of text from somewhere. 3. Do some editing operations on the textarea. Actual Results: Each editing operation takes almost a second, with enough text. Expected Results: The edit-time should be constant, and not depend on the length of text in the field.
Chris, I have a 1.9 Ghz machine, WinXP, Fx 0.9.1; and would like to see if I also experience this, so I can confirm the bug. How much text is required before Firefox slows down? If you could attach a txt file with a large amount of text (the amount at which the textarea becomes slow) then it can be pasted it into a textarea and bugzilla ppl can do a little testing.
I just copied and pasted ~120,000 characters into this bugzilla textarea, and didn't notice any slowdown at all. I'm on a P4 1.8Ghz, 256Mb, FF 0.9.1. Can you provide an example of a page and an amount of text that shows this problem?
An additional requirement to see the bug: all the text has to be on one line. I didn't realize this before because I maintain a blog using Firefox, and my style is to use no paragraph breaks. So with all the text on the same logical line (no hard linebreaks, in other words) you can see the effect easily. Strangely enough, it doesn't appear to have the same effect if you delete the line breaks between a couple of paragraphs and start typing in them. It's easy to get enough text--just mash on the keyboard, sans the enter key, until you get up about 10 lines in an 80-char-wide textarea. The effect at that point is annoying enough that it's hard to type (real text) without losing your flow.
WFM. I have just pasted just over 5,000 lines of text into this bugzilla text area and there did seem to be a minimal slowdown. I didn't however experience any problems at 10 lines of continuous text. It may be due to some Javascript or other client-side code running against your blog, doing something as you type (like counting number of keystrokes remaining). What blog software do you use?
I use a simple homespun PHP based piece. There's absolutely no javascript in it, as I don't know javascript. It's as simple as you can get. The same thing happens on any and every textarea I find. Pasting, though, seems to mitigate the effect. I just tried typing a paragraph with about 10 lines of "aetohun nuoe hu onu nteo" key-mashing, and it started to get slow like I've said. I went back a few "words" and typed a couple characters, then went back to the end of the paragraph, and the delay was gone. I just tried the same experiment again, and it didn't happen. Seems the bug's a bit elusive, but just a bit. Whenever I just type in text like that, it always slows down. I'm able to notice after about 6 lines, and it gets annoying after 10.
BTW, this bug was present at least since 0.8.
I have now run into this same problem on 2 separate sites, from 2 separate machines, both running Firefox 1.0. It doesn't occur in all cases involving a textarea. I suspect(but have not confirmed) it may have something to do with javascript on the page being called after each keypress within the textarea(like scripts that are doing character counts). On the machine I'm posting on, I can reproduce the effect at around 100 characters at one site. In both cases that I've experienced it, I've noticed the textarea had a character count script.
This bug was last touched before 1.0.4. Is it still reproducable? Try the latest branch build (1.0.5): http://www.mozilla.org/products/firefox/ Try the latest nightly trunk build (v1.0+): http://www.mozilla.org/developer (Reviving old UNCONFs)
Well, I am using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060326 Firefox/1.5.0.3 (Debian-1.5.dfsg+1.5.0.3-2), so I am under Linux. I notice this behaviour for long time now, even in this textarea. Steps to reproduce: 1) create a textfile of 50 rows, each 4000 characters long 2) paste it into this textarea 3) try to type anywhere. 4) at the bottom it requires approximately 0.8s/character and CPU goes 100%, being this an 1.6GHz AMD/K7. In the middle it may be even slower. When editing a larger Wikipedia article the speed reaches 2sec/character, which is really remarkable. :)
As a active member of the Wikipedia community, I've never encountered this problem, even when editing large articles.
Assignee: bross2 → nobody
I just attempted 10,000 words (from lipsum.com) on one line in a textarea using Firefox 2.0.0.3 and had absolutely no slow down. Based on the comments, I'm resolving this as "works for me". If you can narrow down what textareas this is happening in and see the issue using a clean profile, please reopen this bug. (Bonus points for specific sites this happens on and a testcase attached to this bug which exhibits the problem.)
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.