Closed Bug 53091 Opened 25 years ago Closed 25 years ago

Tree selection performance is horrible

Categories

(Core :: XUL, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: hyatt, Assigned: hyatt)

Details

(Whiteboard: [need info])

The following rule pattern in CSS: tree:focus blah blah blah treerow { } is extremely inefficient and (in our implementation of CSS) results in a style-re-resolve on all descendants of the focused tree. Given that this is not easy to fix for 6.0, I would argue that these rules should be backed out of all skins for now. Note that the focus ring rule is ok, since it operates directly on the tree (and not on descendants of the tree), so it can stay. We would lose: (1) The dotted border around the current item when focused (2) The color change on selected items when trees are focused
Re-assigning to hangas and nominating for nsbeta3.
Assignee: hyatt → hangas
Keywords: nsbeta3
Point well taken. Just to note, there is only one descendant combinator in the tree focus selection rules, e.g. tree:focus > treechildren treeitem[selected="true"] > treerow ... not three as in the example you gave. By the way, I've changed the rules of focus rings quit a bit. No descendant combinators, but plenty of long series of child combinators, e.g. #folderTree > treehead > treerow > .treecell-header ... are these reasonably efficient?
cc'ing andreww
Nope. Anything of the form tree:focus with anything after it, be it a child or descendant is going to be too slow.
Actually, let me study the CSS implementation so that I can try to answer this extremely accurately. For now the row rules should definitely go.
Ok, hold up. I think something is going wrong with focus here that's making this worse. Stay tuned.
Yay, I'm glad i kept looking at this! The rules can stay. This is actually a problem with :focus and :active in nsEventStateManager.cpp. I have a fix. Part of the slowdown was also a problem with :active being incorrectly applied (and slowing down the tree for :focus cases). A happy side-effect of this fix is that it also makes twisties and scrollbars in tree views properly go into :active now.
Assignee: hangas → hyatt
Dave, will this affect the :active state on treecells as well? Ben and I have attempted to make treecells appear pressed when clicked, but they have never matched any CSS rules like treecell:active.
nsbeta3+, This is one of the smoking gun dependencies for tree performance, which seems to be a dogfood issue for several engineers, and probably should be nsbeta3+ in its own right.
Priority: P3 → P2
Whiteboard: [nsbeta3+]
Target Milestone: --- → M18
Status: NEW → ASSIGNED
Priority: P2 → P3
Summary: Back out all tree:focus rules with descendants from skins → Tree selection performance is horrible
Whiteboard: [nsbeta3+]
Oops. Blew away trudelle's nsbeta3+ of the bug. Putting it back.
Whiteboard: [nsbeta3+]
Priority: P3 → P2
So should I, or should I not, remove the accused selectors from the modern and classic themes?
They're ok. Keep 'em.
Keep 'em. I have the fix in hand for the nsEventStateManager.cpp.
fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Great! tree:focus elements are very useful.
verified fixed win32 092005, linux 092013, mac 091920
Status: RESOLVED → VERIFIED
reopening and changing OS to linux. linux mail/news is not usable because of this problem.
Status: VERIFIED → REOPENED
OS: Windows NT → Linux
Resolution: FIXED → ---
Whiteboard: [nsbeta3+]
jud, are you using a debug or an optimized build?
I suspect joki's hover changes as being the culprit here.
nominating for rtm, but need info on exactly how to reproduce.
Keywords: rtm
Whiteboard: [need info]
resolving as wfm
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → WORKSFORME
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.