What do you want to achieve?
Faster Screen/Component Generation while using Themes. Currently the generated code is ridiculously slow and fully building my system is taking over 100 minutes. Once generated, the theme swapping works great, but it is an unacceptable time sync to get to that point.
What have you tried so far?
Upgraded from SL 1.3.4 to SL 1.4.0
Speed Comparison
Screen | 1.3.4 (ms) | 1.4.0 (ms) |
---|---|---|
1 | 174 | 839 |
2 | 15 | 9608 |
3 | 206 | 50,934 |
4 | 1,428 | 301,029 |
Benchmark made using exact same system code, from 1.4.0, then replacing ‘ui_object_set_themeable_style_property’ lines with the direct assignments as 1.3.4 would have generated
Others
- SquareLine Studio version: 1.4.0
This appears to apply to widgets/components generated directly in Squareline as well as widgets/components generated in code.
For every widget using a theme made (each ui_object_set_local_style_property call), the next widget made that has a theme takes longer. This has resulted in order of screen creation drastically increasing generation times and full system generations to take time measured in hours, when previously it would only be ~10 seconds.
When i stress tested by just creating a huge number of components using themes, i was able to watch the time per cycle drastically increase.
Each pass of ui_object_set_local_style_property took:
Pass | Time (ms) |
---|---|
1 | 10 |
100 | 20 |
200 | 35 |
300 | 45 |
400 | 70 |
600 | 100 |
800 | 125 |
1000 | 150 |
1500 | 200 |
2000 | 250 |
As it went, it would just take longer for each one