-
Notifications
You must be signed in to change notification settings - Fork 57
rbx_binary: Index Properties Once (+37%) #544
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
Open
krakow10
wants to merge
16
commits into
rojo-rbx:master
Choose a base branch
from
krakow10:propinfo5
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or 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
This was referenced May 30, 2025
Open
1fbd57d to
5aa5c43
Compare
|
I've found a test case that's not covered! No test checks to see whether non-serializing properties actually do not serialize. |
This was referenced Jun 10, 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.
PropInfo.default_value#543 for fallback&'static Variantreferences.I identified a performance issue observed in #533, and found that it is applicable to the serializer in general. Basically the part where it scans instance properties for aliases in
serialize_propertiescan be omitted.According to the "Miner's Haven/Serialize" benchmark, this improves serializer throughput by +37%. Deserialization is not touched and is within noise, ±3%.
The core concept behind this change is to collect references to property values in
collect_type_info, and then use those references inserialize_propertiesinstead of having to scan the instances for the properties again. The code organization can probably be substantially improved, but I don't have any ideas at the moment so please do advise me. The giant function signatures are not nice inserialize_properties(clippy is NOT happy about that)and the control flow is particularly twisted there too. I've squeaked under the 7 argument limit, but there are still simplifications to be made. The problem is mostly thetype_mismatchandinvalid_valueclosures making the function signatures huge.There are four previous incarnations of this at various stages because there is truly a lot of conflicting requirements to be met for everything to work correctly... Notably migration is at odds with taking Variant inner type references, and interleaved bytes is at odds with building prop chunks procedurally. I wouldn't have been able to pull this off without the excellent testing suite.