Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive garbage buildup #103

Open
megagrump opened this issue Dec 20, 2021 · 11 comments · Fixed by #107 or #109
Open

Excessive garbage buildup #103

megagrump opened this issue Dec 20, 2021 · 11 comments · Fixed by #107 or #109
Assignees
Labels
enhancement New feature or request v1.0.0

Comments

@megagrump
Copy link
Contributor

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.

@megagrump
Copy link
Contributor Author

Another example

This string should be cached in ActiveInstance if possible instead of regenerating it every time.

@flamendless
Copy link
Owner

Thank you! I'll work on this one

@megagrump
Copy link
Contributor Author

After looking at the code in more detail I realize it's going to be a bit more complicated.

This part should use locals 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.

@flamendless
Copy link
Owner

Great! I'll use your test as a reference as well

@megagrump
Copy link
Contributor Author

Closed? What about the rest of the code, lol

@flamendless flamendless reopened this Dec 21, 2021
@flamendless
Copy link
Owner

I thought it was the PR closed. My bad.

@megagrump
Copy link
Contributor Author

megagrump commented Dec 21, 2021

  • Button
  • CheckBox
  • ColorPicker
  • ComboBox
  • Dialog
  • Dock
  • Image
  • Input
  • LayoutManager
  • ListBox
  • Menu
  • MenuBar
  • MenuState
  • Region
  • Seperator
  • Shape
  • Text
  • Tooltip
  • Tree
  • Window
  • DrawCommands

@megagrump
Copy link
Contributor Author

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.

@flamendless
Copy link
Owner

flamendless commented Jan 21, 2022

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.

@megagrump
Copy link
Contributor Author

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.

@flamendless
Copy link
Owner

Sadly i already did a lot of work undoing them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants