-
Notifications
You must be signed in to change notification settings - Fork 222
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
Apply a large number of optimizations #4698
Merged
MistakeNot4892
merged 19 commits into
NebulaSS13:dev
from
out-of-phaze:optimize/ship-mass
Jan 8, 2025
Merged
Apply a large number of optimizations #4698
MistakeNot4892
merged 19 commits into
NebulaSS13:dev
from
out-of-phaze:optimize/ship-mass
Jan 8, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out-of-phaze
force-pushed
the
optimize/ship-mass
branch
from
January 5, 2025 22:30
0f8ab38
to
2d3c37f
Compare
out-of-phaze
force-pushed
the
optimize/ship-mass
branch
4 times, most recently
from
January 5, 2025 23:50
fa16773
to
3014d48
Compare
out-of-phaze
force-pushed
the
optimize/ship-mass
branch
from
January 5, 2025 23:52
3014d48
to
5b59655
Compare
out-of-phaze
force-pushed
the
optimize/ship-mass
branch
from
January 6, 2025 00:02
5b59655
to
e1c1aa0
Compare
MistakeNot4892
approved these changes
Jan 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
ref()
less GC queues, avoiding string tree rebalances and making it more accurate. To do this it uses refcount() to determine when something has no remaining references, rather than waiting for it to just fall out of the queue via softdel.var/turf/T in world
loops inrecalculate_vessel_mass()
.hud_layerize
ing or whatever when they move to another loc as part of not-being-deleted, so updating the UI was just totally redundant.)icon_states()
.I should really spin up a test server to test some of the more fragile changes like the seed stuff, world/inventory icons, etc. As far as I saw when I spun up a server locally to benchmark and sat in the lobby to watch the GC queue, things pass GC just fine.
Also some non-optimization changes:
check_state_in_icon()
in bookshelf code.\the [foo.name]
in strings.Why and what will this PR improve
From my local benchmarking:
~20% save on get cached info
~8% on get instance of
~7.5% on reconsider single icon
~12% on recalculate_vessel_mass
~8.5% overall on /obj/item/Initialize
~23% overall on /atom/proc/Initialize
~27.5% save in /datum/proc/Destroy
Authorship
ref()
less GC queues taken from TG master at the time of writing this PR. Original implementation on TG was here: tgstation/tgstation#72033 but it has been overhauled several times since.Everything else is by me.
Changelog
No user-facing changes.