Closed Bug 576349 Opened 14 years ago Closed 8 years ago

slow rendering when click, change or focus a select box field (dropdown list)

Categories

(Core :: Widget: Win32, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jaime_delgadovidal, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6

When I try to manipulate a select box, either by showing its options or changing the selected option, I have to wait almost a second until the state of the select box is updated. The same occurs when I try to focus another form element when the select box is already focused.

Reproducible: Always

Steps to Reproduce:
1. Load "http://www.htmlcodetutorial.com/linking/linking_famsupp_114.html", or any website that has a select box inside.
2. Try to manipulate the first "select box" using the mouse (showing its options and changing the selected option) and measure the time it takes the "select field" to be updated.
3. Load "http://demo.admintasia.com/forms.php".
4. Repeat step 2 with the first "select box" in page loaded in step 3.
5. Compare performance of select-box rendering between both websites.
Actual Results:  
When select box is being manipulated in the website mentioned, updating is considerably slow.

Expected Results:  
When select box is being manipulated in the website mentioned, updating should be instantly, just as it is in other websites. Internet Explorer 8 also renders it instantly.

I have default theme and many add-ins. However, I have reproduced the same bug in Firefox safe-mode, and in another computer with Firefox and XP. Furthermore, I have also reproduced the bug adding an <IFRAME> in a mail message inside Thunderbird.
Sounds like a likely painting issue....
Component: Layout: Form Controls → Widget: Win32
QA Contact: layout.form-controls → win32
I was doing some tests about this bug and I have probably discovered the main issue that produces the problem: it is "-moz-box-shadow". When I disable "-moz-box-shadow", select-box renders almost instantly.

To test the difference, you can use Firebug following these steps:
1. Load "http://demo.admintasia.com/forms.php" with Firebug installed, and see how long it takes when you manipulate the first select box using the mouse.
2. Inspect the element <div id="page-content-wrapper" (...)>. (It is the big white box that covers almost all the page.)
3. In the style (CSS) panel, find "#page_wrapper #page-content #page-content-wrapper" (ui.core.css line 850), and disable property "-moz-box-shadow".
4. Compare rendering time of select box when this CSS option is enabled and disabled.

I don't know if it is really a bug, or if it is unavoidable that rendering a shadow around a big box takes that time. Anyway, if it were unavoidable, you might consider warning developers at:
"https://developer.mozilla.org/en/css/-moz-box-shadow".
Can you retest on trunk (nightly.mozilla.com)? We did some optimizations to blurred box-shadows that should have fixed this.
I have just tested latest versions, or this is what I think. I didn't know if changes you told were made to 3.6 or 4.0 branch, so I tested both. I will show you a table with every version tested and the time it takes to show the select options, counting from when I click on the select box. Select box tested is at "http://demo.admintasia.com/forms.php".

TIME COMPARISON OF SELECT BOX RENDERING (-MOZ-BOX-SHADOW=ON)
- 3.6.6 = 0.40 seconds -- Build: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
- 3.6.8pre = 0.40 seconds -- Build: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8pre) Gecko/20100702 Namoroka/3.6.8pre
- 4.02pre = 0.23 seconds -- Build: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:2.0b2pre) Gecko/20100702 Minefield/4.0b2pre

Time were measured with a stopwatch so seconds are approximated.

On 4.02pre version, performance has clearly improved, although it is not instantly, as it is when "-moz-box-shadow" is disabled. I think 0.23 seconds is acceptable, but Mozilla developers have the final say.
WFM based on comment 4
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.