iTwin / presentation

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

`models-tree`: Pre-determine subjects' children flag #599

Closed grigasp closed 5 months ago

grigasp commented 5 months ago

Part of https://github.com/iTwin/presentation/issues/597.

Often, to determine whether a Subject node needs to be displayed or not, we have to run a bunch of queries to see if its branch contains at least one Model with elements. However, with https://github.com/iTwin/presentation/pull/598, we already have that information, so here we just make use of it.

image

image

There're still a few cases that need to be look at.

changeset-bot[bot] commented 5 months ago

⚠️ No Changeset found

Latest commit: 3490d4d6e8f19e32c74735f77e161df1fe67ceca

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

github-actions[bot] commented 5 months ago

Hierarchies benchmark

Benchmark suite Current: 3490d4d6e8f19e32c74735f77e161df1fe67ceca Previous: 36a7eef6d0a57ed55ffc9d37e27cb056e03a2de4 Deviation Status
flat 50k elements list 4094.44 ms 4161.23 ms -1.6051%
flat 50k elements list (P95 of main thread blocks) 73 ms 72 ms 1.3889% 🚨
grouping by label 10069.79 ms 10252.02 ms -1.7775%
grouping by label (P95 of main thread blocks) 61 ms 65 ms -6.1538%
grouping by class 10276.01 ms 10336.98 ms -0.5898%
grouping by class (P95 of main thread blocks) 46 ms 42 ms 9.5238% 🚨
grouping by property 10814.13 ms 10977.96 ms -1.4924%
grouping by property (P95 of main thread blocks) 93 ms 49 ms 89.7959% 🚨
grouping by base class (10 classes) 7435.08 ms 7485.66 ms -0.6757%
grouping by base class (10 classes) (P95 of main thread blocks) 76 ms 81 ms -6.1728%
grouping by multiple attributes 27534.51 ms 28631.65 ms -3.8319%
grouping by multiple attributes (P95 of main thread blocks) 51 ms 65 ms -21.5385%
hide if no children required to finalize root, w/o children 46878.31 ms 48922.06 ms -4.1776%
hide if no children required to finalize root, w/o children (P95 of main thread blocks) 40 ms 39 ms 2.5641% 🚨
hide if no children required to finalize root, w/ children 166.74 ms 179.41 ms -7.0620%
hide if no children required to finalize root, w/ children (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨
models tree initial (Baytown) 54.77 ms 57.16 ms -4.1812%
models tree initial (Baytown) (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨
models tree full (Baytown) 7631.18 ms 7739.42 ms -1.3986%
models tree full (Baytown) (P95 of main thread blocks) 92 ms 85 ms 8.2353% 🚨

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