iTwin / presentation

Monorepo for iTwin.js Presentation Library
https://www.itwinjs.org/presentation/
MIT License
4 stars 0 forks source link

Unified-selection: batch iModel selection changes #657

Closed jasdom closed 1 month ago

jasdom commented 1 month ago

Changed handleIModelSelectionChange to update selection storage with all changes at once instead of one by one as this improves performance and prevents storage from being unnecessarily cleaned when the same element is selected.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: a208095c0fe64221953324e539fe9f37664667b4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ------------------------------------- | ----- | | @itwin/unified-selection | Patch | | @itwin/presentation-hierarchies-react | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

github-actions[bot] commented 1 month ago

Unified selection benchmark

Benchmark suite Current: a208095c0fe64221953324e539fe9f37664667b4 Previous: b9598f6702bea0f466abae02378a0c958f8e5fe9 Deviation Status
hilite 50k elements 1251.07 ms 1197.81 ms 4.4464% 🚨
hilite 50k elements (P95 of main thread blocks) 43 ms 45 ms -4.4444% ✅
hilite 50k group elements 239.22 ms 241.39 ms -0.8990% ✅
hilite 50k group elements (P95 of main thread blocks) 31 ms 31 ms 0% 🟰
hilite 1k subjects 47554.71 ms 47428.79 ms 0.2655% 🚨
hilite 1k subjects (P95 of main thread blocks) 28 ms 26 ms 7.6923% 🚨
hilite 50k subcategories 278.2 ms 280.51 ms -0.8235% ✅
hilite 50k subcategories (P95 of main thread blocks) 32 ms 33 ms -3.0303% ✅
hilite 50k functional 3D elements 25543.56 ms 26510.05 ms -3.6457% ✅
hilite 50k functional 3D elements (P95 of main thread blocks) 32 ms 39 ms -17.9487% ✅
hilite 50k functional 2D elements 6184.68 ms 6091.73 ms 1.5258% 🚨
hilite 50k functional 2D elements (P95 of main thread blocks) 34 ms 37 ms -8.1081% ✅
compute selection for 50k elements 310.79 ms 309.3 ms 0.4817% 🚨
compute selection for 50k elements (P95 of main thread blocks) 31 ms 31 ms 0% 🟰
compute parent selection for 50k elements 335.33 ms 348.94 ms -3.9004% ✅
compute parent selection for 50k elements (P95 of main thread blocks) 31 ms 32 ms -3.1250% ✅
compute top ancestor selection for 50k elements 563.96 ms 561.28 ms 0.4775% 🚨
compute top ancestor selection for 50k elements (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨
compute category selection for 50k elements 95.14 ms 91.6 ms 3.8646% 🚨
compute category selection for 50k elements (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨
compute model selection for 50k elements 76.11 ms 90.55 ms -15.9470% ✅
compute model selection for 50k elements (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨
compute functional selection for 50k 3D elements 418.56 ms 406.3 ms 3.0175% 🚨
compute functional selection for 50k 3D elements (P95 of main thread blocks) 31 ms 31 ms 0% 🟰
compute parent functional selection for 50k 3D elements 465.45 ms 449.19 ms 3.6198% 🚨
compute parent functional selection for 50k 3D elements (P95 of main thread blocks) 38 ms 31 ms 22.5806% 🚨
compute top ancestor functional selection for 50k 3D elements 1141.11 ms 1147.78 ms -0.5811% ✅
compute top ancestor functional selection for 50k 3D elements (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨
compute functional selection for 50k 2D elements 2980.45 ms 3034.42 ms -1.7786% ✅
compute functional selection for 50k 2D elements (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨
compute parent functional selection for 50k 2D elements 2998.2 ms 3011.11 ms -0.4287% ✅
compute parent functional selection for 50k 2D elements (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨
compute top ancestor functional selection for 50k 2D elements 3080.66 ms 2995.01 ms 2.8598% 🚨
compute top ancestor functional selection for 50k 2D elements (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨

This comment was automatically generated by workflow using github-action-benchmark.