Community
Participate
Working Groups
It can be faster if it inserts items at minimum possible position. For example, for an empty TreeItem, it's best to `gtk_tree_store_prepend` instead of `gtk_tree_store_append()`.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/185276
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/185275
The speedup for 'Tree.setItemCount()' is pretty dramatic: | Before | 1 patch | 2 patches | +---------+---------+---------+---------+---------+---------+ items| REGULAR | VIRTUAL | REGULAR | VIRTUAL | REGULAR | VIRTUAL | -----+---------+---------+---------+---------+---------+---------+ 10k | 1.44s | 0.99s | 0.17s | 0.18s | 0.14s | 0.13s | 100k | 284.60s | 165.97s | 1.71s | 1.77s | 1.40s | 1.27s | 1m | ??????? | ??????? | 17.08s | 17.78s | 14.59s | 13.46s | The patches also improved Table's speed (2x at 100k items).
I figured that the same idea can be applied to win32 Tree to speed it up as well. I'll do that some week later, need to do something else first.
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/185275 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=6d78dcbb9ac30996988fc5508369c8e1b46362fb
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/185276 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=616d50c48b448df3043e67770a72d3e6c5467004
Thanks, Alexandr. Is this bug still open? If not please update its status.
I noticed that win32 Tree could benefit from the same patch. I'm going to implement it somewhere in next 7 days and then I will mark Bug as fixed.
(In reply to Alexandr Miloslavskiy from comment #8) > I noticed that win32 Tree could benefit from the same patch. I'm going to > implement it somewhere in next 7 days and then I will mark Bug as fixed. Thanks. Every change which make win faster is highly appreciated.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187202
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187203
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187202 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=dfb62303155978f00571487190dd5fb87edc58e9
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187203 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=84a0060932449a3cda03901d81129ec9c028d1d1
Niraj, thanks for handling the patches!
Windows part of the patch also achieves dramatic speedup of 'Tree.setItemCount()' : | before patch | after patch | +-----------+-----------+-----------+-----------+ | REGULAR | VIRTUAL | REGULAR | VIRTUAL | ----------------+-----------+-----------+-----------+-----------+ 10_000 items | 0,44sec | 0,43sec | 0,07sec | 0,06sec | 100_000 items | 113,83sec | 111,95sec | 0,70sec | 0,63sec | 1_000_000 items | too long | too long | 6,82sec | 6,28sec |
(In reply to Alexandr Miloslavskiy from comment #15) > Windows part of the patch also achieves dramatic speedup of > 'Tree.setItemCount()' : > > | before patch | after patch | > +-----------+-----------+-----------+-----------+ > | REGULAR | VIRTUAL | REGULAR | VIRTUAL | > ----------------+-----------+-----------+-----------+-----------+ > 10_000 items | 0,44sec | 0,43sec | 0,07sec | 0,06sec | > 100_000 items | 113,83sec | 111,95sec | 0,70sec | 0,63sec | > 1_000_000 items | too long | too long | 6,82sec | 6,28sec | Thanks Alexandr, This is very much appreciated :) Resolving for M3, any further ideas/improvements are still welcomed but should be tracked in separate bugs.
Marking verified based on comment 15
Change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187203 broke the variables and breakpoints view: The 1st part of the SashForm containing the Tree is not rendered correctly anymore. I opened bug 577212 for this.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187117
(In reply to Eclipse Genie from comment #19) > New Gerrit change created: > https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187117 This reverts original commit, as it causes blocker issue for debugging / using IDE on Windows, see bug 577212. Since original patch caused such a regression, I would propose to postpone with the fix for this bug to 4.23 to get enough test coverage for the *fixed* patch that probably follows. @Sebastian: thanks for reporting!
(In reply to Andrey Loskutov from comment #20) > (In reply to Eclipse Genie from comment #19) > > New Gerrit change created: > > https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187117 > > This reverts original commit, as it causes blocker issue for debugging / > using IDE on Windows, see bug 577212. > > Since original patch caused such a regression, I would propose to postpone > with the fix for this bug to 4.23 to get enough test coverage for the > *fixed* patch that probably follows. > > @Sebastian: thanks for reporting! +1 Sounds good to me.
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187117 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=0722f4f2a06b100246d7afaf67a8772baa9e232b
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187659
The mistake was a simple one, early return could have left Tree in a state where drawing is disabled. Fixed that now. Sorry for the trouble!
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187659 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=17b4024759c8084afa680a06b7b2803463e84114
(In reply to Eclipse Genie from comment #25) > Gerrit change > https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/187659 was > merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=17b4024759c8084afa680a06b7b2803463e84114 Thanks Alexandr for the revised fix, resolving now.
Verified(including scenario for bug 577212) on Win10 using Build id: I20220106-0000
As best as I can tell this caused a regression in the Tree. Please see https://github.com/eclipse-platform/eclipse.platform.swt/issues/287#issuecomment-1205748918