Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preliminary Perfetto findings #76

Closed
sudara opened this issue Aug 25, 2023 · 7 comments · Fixed by #80
Closed

Preliminary Perfetto findings #76

sudara opened this issue Aug 25, 2023 · 7 comments · Fixed by #80

Comments

@sudara
Copy link
Owner

sudara commented Aug 25, 2023

Note: All these timings are Debug (important context for the inspector) and just performed on my main app, which does have a lot of components but not outrageous.

Outline Component

8735 calls to close subitems, adding up to 137ms.

Google Chrome - 2023-08-25 24@2x

Select Component

Again, recursively closing is an offender, and it's called twice.

Google Chrome - 2023-08-25 31@2x

Toggle

Looks likeComponentModel::selectComponent is called twice

Google Chrome - 2023-08-25 30@2x

,

@sudara
Copy link
Owner Author

sudara commented Aug 25, 2023

Looks like the preview snapshot is also being called twice per ComponentModel::updateModel

Google Chrome - 2023-08-25 30 2@2x

@sudara
Copy link
Owner Author

sudara commented Aug 25, 2023

Color picker is doing a good job being efficient

Google Chrome - 2023-08-25 31 2@2x

@sudara
Copy link
Owner Author

sudara commented Aug 25, 2023

restoreBoundsIfNeeded sorta takes up a gross 15ms when the inspector closes.

Google Chrome - 2023-08-25 41@2x

@sudara
Copy link
Owner Author

sudara commented Aug 29, 2023

The preview snapshot and doubling up on selection/tree closing is fixed in #80.

restoreBoundsIfNeeded is a tricky one. As expected, resized being called multiple times is hurtful.

Google Chrome - 2023-08-29 42@2x

@sudara
Copy link
Owner Author

sudara commented Aug 30, 2023

Post optimization Debug times:

initial tree construction of > 8k items and inspector construction in 37ms:
Google Chrome - 2023-08-30 01@2x

select component in 1.6ms:

Google Chrome - 2023-08-30 35@2x

Outline component in 3ms
Arc - 2023-08-30 55@2x

toggle back on in 25ms:
Arc - 2023-08-30 57@2x

toggle off in 21ms:
Google Chrome - 2023-08-30 33@2x

lowest hanging fruit left is probably restoring bounds

@sudara
Copy link
Owner Author

sudara commented Aug 30, 2023

Almost all time is spent in setResizable — it seems to call recreateDesktopWindow.

Google Chrome - 2023-08-30 16@2x

@sudara
Copy link
Owner Author

sudara commented Aug 30, 2023

Without calling setResizable, toggle off is down to 1.5ms

Google Chrome - 2023-08-30 55@2x

And toggle on is down to 1.2ms
Google Chrome - 2023-08-30 33 2@2x

There's not much change in behavior since setResizeLimits is still being called, so that prevents unintentional UI states (like resizing the inspector when disabled).

@sudara sudara closed this as completed in #80 Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant