Closed Bug 680461 Opened 13 years ago Closed 3 months ago

Textarea in a container of a small width causes lag when resizing browser or copying text into the textarea

Categories

(Core :: Layout, defect)

x86_64
Windows 7
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jayden, Unassigned)

References

Details

(Keywords: perf)

Attachments

(2 files)

Attached file testcase.html
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0 Build ID: 20110615151330 Steps to reproduce: We have a site with a YUI 2 tabview and a textarea with lots of text. Actual results: If you load the page to a tab where the textarea is on a non active tab the browser lags. If you load the page to the tab with the textarea the browser doesn't lag. Expected results: It would be nice if you didn't have to sit for some time with your browser being completely unresponsive.
This lag occurs in Firefox 3.6, 5, 6, and 7. The lag seems to take longer based on the amount of text in the textarea. With my testcase: Resize the browser so it is fullscreen. Now click each button and view the time it takes to copy the text to the textareas. The default and 50% width (depending on your screen resolution) should copy instantly with no lag. The other 2 will say they copied in the same rough number of milliseconds but the browser will become unresponsive for a bit during the process. If you resize your browser from smaller to larger with all the text in the textareas it can also lag. I tried and it doesn't matter if you are pasting text in the textarea or if the javascript is doing it. Looks like it could be an issue with the number of wrapped lines in the textarea or perhaps the width.
Version: 5 Branch → 7 Branch
Well, I found a change that you can do to yuis css to remove this lag. The hidden tabs have the following css: yui-navset .yui-content .yui-hidden { border: 0 none; height: 0; left: -999999px; overflow: hidden; padding: 0; position: absolute; visibility: hidden; width: 0; } If you add this as an overriding css rule it solves the issue in yui. It however is still an issue with firefox. .yui-navset .yui-content .yui-hidden { width: 1000px; height: 100px; }
Attachment #554449 - Attachment mime type: text/plain → text/html
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: 7 Branch → Trunk
Attached file WinDbg Log
Confirmed the Differences Of Lagtime on the Testcase with Mozilla/5.0 (Windows NT 5.1; rv:9.0a1) Gecko/20110821 Firefox/9.0a1 ID:20110821030758 Attached a WinDbg Log in Case it helps. Ran this against the "0 Width Case" since it has the longest Lagtime for me.
Summary: Testarea in a container of a small width causes lag when resizing browser or copying text into the textarea → Textarea in a container of a small width causes lag when resizing browser or copying text into the textarea
Similar to Bug 667412
Yeah, we should retest here when that's fixed.
Depends on: 667412
Actually, should retest after bug 561578 and/or bug 682051 are fixed.
Depends on: 561578, 682051
No longer depends on: 667412
For me, all cases seem to take 1-2 milliseconds...
Keywords: perf
Severity: normal → S3

The testcase itself is very fast for me : https://share.firefox.dev/3XgPCIb
Resizing the 4 text-boxes is also fast enough : https://share.firefox.dev/3yTbW0Z\
Maybe with much larger amount of text this testcase may become slow, but new bug can be filed for that I suppose.

I am tempted to close this bug a fixed.
dholbert / :jfk, please reopen if you disagree.

Status: UNCONFIRMED → RESOLVED
Closed: 3 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: