Replies: 1 comment 1 reply
-
I think this is the steps of what should happen at run-time:
|
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
-
I am testing the performance of a Slint application on the Android platform. Compared to native Android applications, Slint seems to use more heap memory in scenarios involving image loading.
Further analysis revealed that after loading an image, the heap memory growth in the Slint application is always twice that of a native Android application.
Using the heap-profile tool for analysis, it was found that Slint allocates heap memory twice each time an image is loaded:
Here is the pseudocode for loading images in the Slint application:
At the same time, I reviewed the Slint source code and found that in the core module, the image data is cloned and stored in an in-memory cache, which leads to two heap memory allocations:
I want to confirm if this logic is correct and whether this issue can be optimized.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions