Skip to content

Reduce some memory usage #5764

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

Merged
merged 6 commits into from
Mar 8, 2025
Merged

Conversation

Absolucy
Copy link
Member

@Absolucy Absolucy commented Mar 3, 2025

About The Pull Request

This does a few things to reduce memory usage, mostly removing some vars off of base types:

  • Gets rid of the code for the airlock hacking minigame, since it's impossible to access said minigame anyways, and it had a var on /atom. If anyone wants this back, they can refactor it to a component.
  • The cached_blood_dna_color var on /atom was moved to /datum/forensics
  • Removes the weather_affectable var on /turf - nothing anywhere ever actually changes it from the default TRUE

Why It's Good For The Game

I want to make these numbers smaller
2025-03-03 (1740993176) ~ dreamseeker

Changelog

🆑
refactor: Removed some unused code and rearranged some other code to hopefully reduce server-side memory usage.
/:cl:

@Absolucy Absolucy added Code: Performance / Optimization the number going down makes me happy :3 Process: do not merge don't merge this ffs Process: should testmerge PR should be testmerged first labels Mar 3, 2025
@@ -9,7 +9,6 @@ GLOBAL_VAR_INIT(starlight_color, pick(COLOR_TEAL, COLOR_GREEN, COLOR_CYAN, COLOR
temperature = TCMB
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 700000
var/starlight_source_count = 0
Copy link
Collaborator

@LikeLakers2 LikeLakers2 Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use a comment here to indicate removal, as this variable exists over on tgstation.

Suggested change
var/starlight_source_count = 0
//var/starlight_source_count = 0 //MONKESTATION REMOVAL: Unused variable, removed to save memory

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm planning to remove it upstream too if there's not a reasonf or it

@Absolucy Absolucy merged commit d504eed into Monkestation:master Mar 8, 2025
25 checks passed
@Absolucy Absolucy deleted the memory-cleanup branch March 8, 2025 04:11
github-actions bot added a commit that referenced this pull request Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Performance / Optimization the number going down makes me happy :3 Process: should testmerge PR should be testmerged first
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants