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

Consider writing compute intensive segments in Rust #21

Open
ergor opened this issue Oct 7, 2021 · 1 comment
Open

Consider writing compute intensive segments in Rust #21

ergor opened this issue Oct 7, 2021 · 1 comment
Projects

Comments

@ergor
Copy link
Owner

ergor commented Oct 7, 2021

I believe Java suffers from not having value-type structs. We cannot pass a coordinate, nor return one, without allocating it on the heap. There are millions of allocations being done while rendering, which must unnecessarily slow down the process.

Consider the following options:

  • Keep using Java only. Try to profile the program and find out whether it is possible to optimize.
  • Re-write the rendering logic in Rust. The Java part of the program shall deal with input and preprocessing, and delegate the heavy lifting to the Rust program.
  • Re-write the complete program in Rust.
@ergor
Copy link
Owner Author

ergor commented Oct 7, 2021

Options for Rust:
NBT library: https://github.com/PistonDevelopers/hematite_nbt
JNI, j4rs

@ergor ergor added this to To do in road to 1.0 Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
road to 1.0
  
To do
Development

No branches or pull requests

1 participant