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

Compile times #6

Open
martin-t opened this issue Sep 15, 2021 · 2 comments
Open

Compile times #6

martin-t opened this issue Sep 15, 2021 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@martin-t
Copy link
Owner

Switch to a hashmap or trie for storing the strings, the generated match is huge:

cargo llvm-lines:

  Lines          Copies       Function name
  -----          ------       -------------
  119771 (100%)  4182 (100%)  (TOTAL)
   30067 (25.1%)    1 (0.0%)  rec_wars::cvars::Cvars::set_str
    5892 (4.9%)     1 (0.0%)  rec_wars::cvars::Cvars::get_string
    3083 (2.6%)     1 (0.0%)  rec_wars::rendering::render_viewport

and render_viewport is a huge 700 line function.

Maybe llvm lines are not the best metric but it absolutely does add a lot to compile times (test with SetGetDummy)

@martin-t
Copy link
Owner Author

@martin-t martin-t mentioned this issue Dec 20, 2021
@martin-t martin-t added bug Something isn't working enhancement New feature or request labels Sep 8, 2022
@martin-t
Copy link
Owner Author

martin-t commented Jun 5, 2023

Made some improvements, rebuild times are acceptable up to 1k cvars.

Waiting for offset_of to to stabilized so we can reasonably support up to 10k cvars (the library alternatives are much, much slower than the built-in version): rust-lang/rust#106655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant