Slab
Slab copied to clipboard
Excessive garbage buildup
Parts of the code use temporary tables and string concatenation in every frame. This leads to huge buildup of garbage, sometimes megabytes per second.
As a first step to improve this, the use of temporary tables should be minimized. Example
Options = Options == nil and {} or Options
This should say
Options = Options or EMPTY
where EMPTY is a static, constant table that exists only once.
This string should be cached in ActiveInstance
if possible instead of regenerating it every time.
Thank you! I'll work on this one
After looking at the code in more detail I realize it's going to be a bit more complicated.
This part should use local
s instead of modifiying the Options table (which would modify the Empty table if no options were given). I'm gonna make those changes to Button
as a test to see if it works out.
Great! I'll use your test as a reference as well
Closed? What about the rest of the code, lol
I thought it was the PR closed. My bad.
- [x]
Button
- [x]
CheckBox
- [ ]
ColorPicker
- [x]
ComboBox
- [ ]
Dialog
- [ ]
Dock
- [x]
Image
- [ ]
Input
- [ ]
LayoutManager
- [x]
ListBox
- [ ]
Menu
- [ ]
MenuBar
- [ ]
MenuState
- [x]
Region
- [ ]
Seperator
- [ ]
Shape
- [x]
Text
- [ ]
Tooltip
- [x]
Tree
- [x]
Window
- [x]
DrawCommands
FYI: I will stop contributing to any love2d related project, including this one. You can say thanks to slime for this. His inability to handle criticism, and him being a shitty person in general made me quit this community.
Can you undo all my commits to this project? I don't want to be part of it anymore.
Ohhh sad to hear this. I'll take it from here then, thank you for the contributions.
~~About the undo, i dont think i can do this for the meantime due to work. You can undo it if you want. Pardon about that~~ Nvm i'll do it though my git knowledge is very limiting.
Save the effort and leave them be, it's not important. I overreacted a little bit. No need to generate more work for you - no one would benefit from it.
Sadly i already did a lot of work undoing them