iTwin / presentation

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

`models-tree`: Pre-load subject-models hierarchy to improve performance of loading subjects hierarchy #598

Closed grigasp closed 3 months ago

grigasp commented 3 months ago

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

image

There are still a few cases that need to be looked at, but this provides a noticeable improvement for large subjects' hierarchy cases.

changeset-bot[bot] commented 3 months ago

⚠️ No Changeset found

Latest commit: 91a33a97e0c76aa0347ec9190790d6bf656100f4

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 3 months ago

Hierarchies benchmark

Benchmark suite Current: 91a33a97e0c76aa0347ec9190790d6bf656100f4 Previous: bda5efff29313d6931dbe128db1f4c678f7217f8 Deviation Status
flat 50k elements list 4050.26 ms 4069.52 ms -0.4733%
flat 50k elements list (P95 of main thread blocks) 73 ms 73 ms 0% 🟰
grouping by label 10086.46 ms 9979.08 ms 1.0761% 🚨
grouping by label (P95 of main thread blocks) 64 ms 62 ms 3.2258% 🚨
grouping by class 10328.69 ms 10375.16 ms -0.4479%
grouping by class (P95 of main thread blocks) 46 ms 43 ms 6.9767% 🚨
grouping by property 10987.22 ms 10652.48 ms 3.1424% 🚨
grouping by property (P95 of main thread blocks) 54 ms 44 ms 22.7273% 🚨
grouping by base class (10 classes) 7462.77 ms 7346.4 ms 1.5840% 🚨
grouping by base class (10 classes) (P95 of main thread blocks) 80 ms 75 ms 6.6667% 🚨
grouping by multiple attributes 27581.71 ms 27229.91 ms 1.2920% 🚨
grouping by multiple attributes (P95 of main thread blocks) 69 ms 50 ms 38% 🚨
hide if no children required to finalize root, w/o children 47441.41 ms 45033.38 ms 5.3472% 🚨
hide if no children required to finalize root, w/o children (P95 of main thread blocks) 40 ms 38 ms 5.2632% 🚨
hide if no children required to finalize root, w/ children 164.61 ms 153.8 ms 7.0286% 🚨
hide if no children required to finalize root, w/ children (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨
models tree initial (Baytown) 55.38 ms 59.96 ms -7.6384%
models tree initial (Baytown) (P95 of main thread blocks) 0 ms 0 ms NaN% 🚨
models tree full (Baytown) 7788.08 ms 7553.11 ms 3.1109% 🚨
models tree full (Baytown) (P95 of main thread blocks) 93 ms 88 ms 5.6818% 🚨

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