[e10s] There is a delay for about 1 seconds to display <select> drop-down list with 1600+ items
Categories
(Core :: Layout: Form Controls, defect, P5)
Tracking
()
People
(Reporter: alice0775, Unassigned)
References
(Depends on 1 open bug, Blocks 3 open bugs)
Details
(4 keywords, Whiteboard: [layout:backlog])
Attachments
(7 files, 1 obsolete file)
Updated•10 years ago
|
Updated•10 years ago
|
Updated•10 years ago
|
Updated•10 years ago
|
Updated•10 years ago
|
Updated•10 years ago
|
Comment 1•10 years ago
|
||
Updated•10 years ago
|
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Comment 5•9 years ago
|
||
Updated•9 years ago
|
Comment 7•9 years ago
|
||
Updated•9 years ago
|
Updated•9 years ago
|
Comment 8•9 years ago
|
||
Comment 10•9 years ago
|
||
Comment 12•8 years ago
|
||
Comment 13•8 years ago
|
||
Comment 14•8 years ago
|
||
Comment 15•8 years ago
|
||
Comment 16•8 years ago
|
||
Comment 17•8 years ago
|
||
Comment 18•8 years ago
|
||
Comment 19•8 years ago
|
||
Comment 20•8 years ago
|
||
Comment 21•8 years ago
|
||
Comment 22•8 years ago
|
||
Comment 23•8 years ago
|
||
Comment 24•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Comment 26•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Comment 27•8 years ago
|
||
Comment 28•8 years ago
|
||
Comment 29•8 years ago
|
||
Comment 30•8 years ago
|
||
| Comment hidden (typo) |
Updated•8 years ago
|
Comment 42•8 years ago
|
||
Comment 45•8 years ago
|
||
Updated•8 years ago
|
Comment 52•8 years ago
|
||
Comment 54•8 years ago
|
||
Comment 56•8 years ago
|
||
Comment 57•8 years ago
|
||
Comment 58•8 years ago
|
||
Updated•8 years ago
|
Comment 59•8 years ago
|
||
Updated•8 years ago
|
Comment 60•8 years ago
|
||
Comment 61•8 years ago
|
||
Comment 62•8 years ago
|
||
Comment 63•8 years ago
|
||
Comment 64•8 years ago
|
||
Comment 66•8 years ago
|
||
Comment 67•8 years ago
|
||
Comment 68•8 years ago
|
||
Comment 69•8 years ago
|
||
Comment 71•8 years ago
|
||
Comment 72•8 years ago
|
||
Comment 74•8 years ago
|
||
Comment 75•8 years ago
|
||
Comment 76•8 years ago
|
||
Comment 77•8 years ago
|
||
Comment 78•8 years ago
|
||
Comment 79•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Comment 83•8 years ago
|
||
Comment 85•8 years ago
|
||
Comment 87•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Comment 89•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Comment 91•7 years ago
|
||
Comment 92•7 years ago
|
||
Comment 93•7 years ago
|
||
Comment 94•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 95•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 97•7 years ago
|
||
Comment 98•7 years ago
|
||
Comment 100•7 years ago
|
||
Comment 101•7 years ago
|
||
Updated•6 years ago
|
Comment 102•6 years ago
|
||
The agreed upon proper solution to this is bug 1421229. Since that work is ongoing, in the interim we should just look for a simple solution to alleviate the problem.
Various improvements have already been made (see dependent bugs) that improved the situation. The biggest remaining issue is the appending of items in the widget displayed in the parent process. We can't get around that without bug 1421229 or a lazy-rendering widget such as a XUL tree.
Probably an effective solution (which I propose is what we should attempt) is to just cap the list of items that is appended at once, display the dropdown, yield to the event loop and then continue appending. (Probably no need to break it into smaller messages coming from the child for simplicity sake).
(Fancier things have been proposed, such as showing an spinning wheel at the bottom of the list while it's not finished yet, but that's probably just wasted effort)
Also, we should have a proper goal in mind, otherwise it will always be possible to make a bigger list to re-demonstrate the problem.. (which then should just be directed to bug 1421229)
A goal would be something like: being able to display 3000 items within 2s, using the reference hardware
(I haven't validated these numbers to see if they are reasonable)
P.S.: a long time ago roc blogged (and wrote a demo, which is no longer online) about the alternative solution of a lazy-rendering widget [1], but (as he mentions in the post) it comes with its own set of problems..
[1] https://robert.ocallahan.org/2014/02/implementing-virtual-widgets-on-web.html
Comment 103•6 years ago
|
||
FF67 resets remote.autostart to true again. Cue another round of having to reset the setting for each user. This is becoming increasingly infuriating.
Comment 104•6 years ago
|
||
Given that bug 1421229 has been WONTFIXed, it looks like we need to reconsider the way forward here. I don't know if Emma is still able to work on this at all, or do we need a new assignee?
Comment 105•6 years ago
|
||
I think we need a new assignee.
Updated•6 years ago
|
Comment 106•6 years ago
|
||
FF68 means this bug no longer has a workaround - neither remote.autostart nor remote.autostart2 do anything. The browser is no longer usable.
Comment 107•6 years ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) from comment #105)
I think we need a new assignee.
Would it be possible to get a new assignee for this bug? It seems people run into this (maybe mostly in enterprise?) and it's a productivity dealbreaker, per e.g. bug 1548941 comment 17.
Comment 108•6 years ago
|
||
We (layout) can discuss this in our upcoming planning meetings and work towards a new solution since bug 1421229 is a WONTFIX. That said, I'm not going to assign anyone immediately as our priorities for this quarter are pretty well established at the moment. I will add to our backlog for the not-to-distant future.
Updated•6 years ago
|
Comment 109•6 years ago
|
||
I'm just going to take over owning this for right now so that it doesn't continue sitting here. However if anyone had their eyes on this please let me know.
Comment 110•6 years ago
|
||
Comment 111•6 years ago
|
||
Have a working prototype of this. It's kind of a hodgepodge of the existing menulist implementation and HTML. Basically the HTML entries just sit in the menulist container to cheaply get native menu styling. It makes things a little complicated, and it's a little ugly, but it's significantly faster.
Anyway, any driveby reviews are welcome, otherwise I'll just continue poking.
Comment 112•6 years ago
|
||
Updated the patch. I got the dom.forms.selectSearch pref to work with the new design, and I started chunking the messages from the content process. With this enabled it takes 80ms on my machine to display a select with 10000 items. So, perceptibly faster than Chrome at this point, which takes something like 500ms on my machine.
Still needs a lot of cleanup though, and I haven't fiddled with any of the styles on Linux or Windows, so it probably looks a bit janky there.
Comment 113•6 years ago
|
||
I tried this patch in a local build, and it looks really promising. Certainly far better performance opening the menu.
One bug I did run into: if I open the <select> menu, I can then use the down- and up-arrow keys to move the highlight, which is fine; but if I run it off the top or bottom of the list, things break -- at the top, it disappears entirely, and at the bottom it seems to get "stuck" on the last item.
Comment 114•6 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #113)
I tried this patch in a local build, and it looks really promising. Certainly far better performance opening the menu.
One bug I did run into: if I open the <select> menu, I can then use the down- and up-arrow keys to move the highlight, which is fine; but if I run it off the top or bottom of the list, things break -- at the top, it disappears entirely, and at the bottom it seems to get "stuck" on the last item.
Ah - yeah that makes sense. Thanks for catching that! Also, if anyone is running this on anything other than osx it will probably not look too great, as I've only styled it on osx. I'll get a more polished patch up today.
Comment 115•6 years ago
|
||
This is an annoyingly large patch. Apologies for that, the development of
the changes did not lend itself to a natural and clean set of atomic
patches.
In essence, this patch converts the parent-process-based select dropdown
implementation into a lazy one, where we populate that part of the
dropdown which is visible to the user, plus a little wiggle room for
APZ.
To do this, I converted the contents of the select dropdown to HTML, in
order to facilitate using position: fixed for the items. I tried juggling
margins on the topmost and bottommost elements and keeping the existing
XUL implementation, and it turned into a bit of a nightmare.
Additionally, moving the code around to support lazily adding in items
also made it easier to send them incrementally from the child to the parent,
rather than sending them all at once. I implemented this with a generator
to simplify holding onto the internal state inside SelectChild.jsm's
buildOptionList. It is synchronous from the perspective of the child - we
send off chunks to the parent while we work, but we don't let the event
loop run. This is to avoid the sticky problem of what happens if the
<select>'s contents in the child process are updated while we are sending
the contents over to the parent. Additionally, it should not generally
represent a substantial performance problem, since the user's focus
should shift to the select dropdown which is displaying in the parent
process.
I moved some of the custom style handling around, to make it simpler to
recycle list items. I don't think this is necessarily the cleanest final
state for the custom styling implementation, but I believe it's nicer at
least than what we had.
I haven't done any accessibility testing on this. I think I will need
assistance in getting that right. I tried to keep all of the a11y code
equivalent, just eyeballing what we set on things, but I doubt that's
sufficient.
Updated•5 years ago
|
Comment 116•5 years ago
|
||
It seems the selected item appears white the first time we build the dropdown. That seems bad.
Comment 117•5 years ago
|
||
Normally, XUL menupopups contain XUL menuitems, and XUL menuitems fire DOMMenuitemActive events from layout to manage a11y focus.
However, the new parent process select dropdown implementation uses a menulist containing div elements instead of XUL menuitems.
DOMMenuItemActive doesn't work for div elements because we check Accessible::ContainerWidget(), and that doesn't know to return the menupopup for div elements.
Since aria-activedescendant is the more web standard way to handle this, the new select dropdown implementation uses aria-activedescendant.
Comment 118•5 years ago
|
||
Comment 119•5 years ago
|
||
This should not yet be closed when the above push merges.
Comment 120•5 years ago
|
||
| bugherder | ||
Updated•5 years ago
|
Comment 121•5 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #116)
Created attachment 9126215 [details]
Selected item regression.It seems the selected item appears white the first time we build the dropdown. That seems bad.
What environment are you on? I haven't seen this on my end.
Comment 122•5 years ago
|
||
Linux, fedora with gnome.
Comment 123•5 years ago
|
||
Weird. What's missing is the blue background for the active item. However, I can't see why it should be missing, and even when I look at the computed styles for the element in the browser toolbox, it says the background color should be blue.
Comment 124•5 years ago
|
||
It's probably fastest for me to just ask where this is coming from. Martin, I'm assuming this is through GTK widget code? In short, for the active element in a select dropdown, the background-color specified here is completely ignored. You can set it to black and it will remain whatever color it was. The color specified on the line above will, however, properly come through. Where is getting set? I thought it was coming through here, but editing that doesn't seem to change anything. Thoughts? I just need an entry point to where this all fits together and I should be able to work out what I'm missing.
Comment 125•5 years ago
|
||
Hi Doug,
gtk widgets are drawn here:
https://searchfox.org/mozilla-central/rev/96f1457323cc598a36f5701f8e67aedaf97acfcf/widget/gtk/gtk3drawing.cpp#3047
and menuitem is here:
https://searchfox.org/mozilla-central/rev/96f1457323cc598a36f5701f8e67aedaf97acfcf/widget/gtk/gtk3drawing.cpp#2070
background-color is ignored because we use Gtk theme to draw the background.
Comment 126•5 years ago
|
||
Bugbug thinks this bug is a regression, but please revert this change in case of error.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 127•5 years ago
|
||
Quick update on this, just so anyone dropping in knows. Currently working through some test failures on this. Most seem trivial, but one involves ensuring that clicking and dragging on the select dropdown's contents will scroll the dropdown popup. I intend to just implement it with a requestAnimationFrame, but it is a bit annoying and I am very tight on time right now.
Updated•5 years ago
|
Comment 129•4 years ago
|
||
I'm getting this freeze/hang without any debug output (using terminal) on the latest (musl) Firefox on Linux. It doesn't happen every time either. Just sometimes, and have to force kill firefox.
Comment 130•4 years ago
|
||
(In reply to Wayne Johnson from comment #129)
I'm getting this freeze/hang without any debug output (using terminal) on the latest (musl) Firefox on Linux. It doesn't happen every time either. Just sometimes, and have to force kill firefox.
If it is not related to selects that have a large number of options then it is likely a different bug.
Comment 131•4 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #130)
(In reply to Wayne Johnson from comment #129)
I'm getting this freeze/hang without any debug output (using terminal) on the latest (musl) Firefox on Linux. It doesn't happen every time either. Just sometimes, and have to force kill firefox.
If it is not related to selects that have a large number of options then it is likely a different bug.
Yes, it has happened when there are like 3 items in the drop down. But doesn't happen for the same page / same drop down each time. It happens at the moment I click the drop down, which never opens. The browser immediately freezes and its window stops rendering. I'm thinking gpu acceleration related, but not sure how to debug.
Comment 132•4 years ago
|
||
Best to file a new bug, adding comments to an old unrelated bugs isn't going to help.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 134•3 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 21 duplicates, 10 votes, 81 CCs and 5 See Also bugs.
:dthayer, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Comment 135•3 years ago
|
||
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
Comment 137•1 year ago
|
||
Unassigning myself because realistically I'm not going to get to this, and I'm not sure it's worth it, given the complexity these patches add and the infrequency of anyone caring. I think this is a low priority, so modifying accordingly.
Description
•