Replies: 2 comments 3 replies
-
|
Some ideas.
|
Beta Was this translation helpful? Give feedback.
2 replies
-
|
AOT compiling might help a little bit. But you get all the tradeoffs of AOT with that. https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am making a property grid / inspector type control where I have a finite but large amount of rows that are generated from data.

Each row is a component and has a number of nested field controls that have non-uniform height. Some of the controls are expanders or lists so the sizes aren't completely stable, a lot of the controls are textboxes but not all of them, some are custom controls with different heights.
My worst case is 100 expanders at the top level that each have 7 rows where each row and expander have 3 textboxes, so about 2500 textboxes in total.
Just generating them naively takes about 4 seconds which is way too long since my users will be doing this a lot, it needs to be responsive after max 1 seconds, preferably .5 seconds.
I did some profiling and almost all of the time is spent doing MeasureCore.
I tried setting constant sizes to maybe ease the measurement load but that did nothing and looking at the source I can't see any early outs so that makes sense.
I also tried different panels simpler than the grid but that did nothing either.
I tried using virtualized panels which is a lot faster but doesnt work since I have variable heights.If I change the textboxes to textblocks (I can't in reality though) it does speed it up quite a bit but it still takes one second and its still MeasureCore.
Currently I'm generating one expander and its content, waiting until a ui background dispatch happens and then do the next expander. This makes it so it doesn't freeze everything and they pop in one at a time which is kinda of fine by itself however this becomes annoying since i have it in a dock tab which detached all my expanders from the visual tree when a tab is hidden which means that it needs to re-add them incrementally again and my scroll position is lost.
This is a simplified example that shows how it would look in the textbox case, I have removed a lot of details to make it easier to read.
Im using avalonia 11.3.11 desktop
My questions are
Beta Was this translation helpful? Give feedback.
All reactions