Surrealism-All / SurrealismUI

A third-party UI library using Slint, I think it will give you an extraordinary experience
https://surrealism-all.github.io/SurrealismUI.github.io/
MIT License
216 stars 20 forks source link

SURIcon causes memory overflow #2

Closed syf20020816 closed 1 year ago

syf20020816 commented 1 year ago

Bug

when any component use SURIcon , will cause memory overflow issues

Reason

After test , I find the reason is : due to the built-in 2658 images generated through loop judgment in SURIcon, which resulted in memory overflow

Solve

I will refactor the icon SURIcon in the next version and fix the problem

syf20020816 commented 1 year ago

Surrealism V0.1.2

V0.1.2 Solve this problem

Performance Testing📈

first import and not build : up about 30.12%⬆️ ~ 34.57% (memery up : 700+ MB)
after first (10 times): up about 2.41% (memery up : 13+ ~ 100- MB)
after first (100 times): up about 0.76% (memery up : 8+ ~ 46- MB)

❗compile time : about 0.37s (single component) My computer configuration is not high