Replies: 9 comments 6 replies
-
Have you tried with recent nightly builds? Especially after #15110 got merged |
Beta Was this translation helpful? Give feedback.
-
I used JetBrains profiler and It looks like the performance is mainly limited by rendering in skia: ![]() ![]() |
Beta Was this translation helpful? Give feedback.
-
I upgraded to the latest prebuild: 11.2.999-cibuild0048108-alpha |
Beta Was this translation helpful? Give feedback.
-
One thing I find odd is the affect by visuals that are not rendered. If I create 1000 nodes and move one of them to the side of the rest and zoom in so that is the only visual object. Then the framerate is at about 30 fps. So visual object not being displayed seem to have an effect. That might be something to look into. |
Beta Was this translation helpful? Give feedback.
-
This is to be expected, because the panel is not virtualizing, but the same applies to WPF. |
Beta Was this translation helpful? Give feedback.
-
@DrDryg either implement your own virtualized canvas or consider to render the items on your own by creating a custom control where you override |
Beta Was this translation helpful? Give feedback.
-
Should it be converted to a discussion? |
Beta Was this translation helpful? Give feedback.
-
Virtualization seem to be the best option for me then, I will have a look what that can give. And I keep my fingers cross that future improvements also will have an impact on this use case. Naively I had expected that elements outside the screen would have close to zero cost, thus making a custom virtualization meaningless. Apparently that is not the case. What calculations are required for each off-screen element that consumes significant time? |
Beta Was this translation helpful? Give feedback.
-
I saw this comment here: #12372 (comment) This might explain the problem. You need to manually increase your memory limit on skia |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
When using many objects, Avalonia becomes surprisingly slow. I want to have a node editor that can manage graphs with hundreds of nodes. I have looked into Nodify where there are both WPF and Avalona versions of it. With WPF the application is fast for several 100 nodes with many connections while the frame-rate of the Avalonia implementation start to drop already at 100 nodes. (I have seen this drop in performance in other contexts too with Avalonia.)
Describe the solution you'd like
That the performance of Avalonia matches that of WPF.
Describe alternatives you've considered
There are alternative solutions to my specific problem. For instance implementing various trick to reduce the amount of redraw needed. Though it might solve my issue with a bit of work it would not improve Avalonia and not benifit any other user of Avalonia. So if it is possible to improve the render speed (or amount of rendering needed) in Avalonia it would benefit many more than me.
Additional context
WPF version of Nodify: https://github.com/miroiu/nodify
Avalonia port of Nodify: https://github.com/BAndysc/nodify-avalonia
I have had a discussion with the author (BAndysc) of the Avalonia port that you may find here: BAndysc/nodify-avalonia#10
There you can find some more details including some thoughts by BAndysc on what can be improved in Avalonia.
Beta Was this translation helpful? Give feedback.
All reactions