-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Parse blocks.json at compile time #330
base: master
Are you sure you want to change the base?
Parse blocks.json at compile time #330
Conversation
Obervations
|
new binary size: 11 263 504 Bytes both were compiled in release mode |
Soo, what do we think about this?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nooooooo!!! 0.00001% increase in compile time!!! bad 100% would not recommend because 0.00001% increase in compileering time
/j
…6/Pumpkin into macro_experiment
I think your are parsing most JSON's way to complex, Take a look at the particles or screens for example. Im sure you could simplify this "id": 4,
"ident": "minecraft:jukebox",
"name": "jukebox" to "minecraft:jukebox": 4 |
@Snowiiii I think this is ready, lmk if you have any other concerns |
Description
This pr experiments with parsing blocks.json at compile time instead of packaging the json string into the binary and parsing it at runtime.
If no major downsides to this approach are found, it can in theory be used for other registries as well.
Testing
run server, place/destoy/pick blocks
Checklist
Things need to be done before this Pull Request can be merged.
cargo fmt
cargo clippy