-
Notifications
You must be signed in to change notification settings - Fork 60
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
Make performance counter optional #9
Comments
Thanks for making this patch. The compile time for the crate bothers me as well. Are the dependencies really the problem for you (they should be cached after the first build right?) or is it the long runtime of the build.rs file? In case of the second I wonder if we can fix it with rust-lang/cargo#2134 by specifying the build.rs dependencies so it does not regenerate the hash-tables every time? |
This should reduce compilation time slightly by avoiding to invoke the build script every time. Altough the big problem with Issue #9 seems to be the compilation of the crate itself that is slowed down by compiling the huge static tables generated by phf.
I did a quick test with the rerun-if-changed attribute but the effect is small as the main time saver is really the compilation of the x86 crate. I'm happy to merge the pull request that makes the performance counters optional. Thanks. |
The
perfcnt
module and the corresponding build script make the build very slow. On my machine, a complete build takes over a minute.One problem are the additional dependencies:
Without the build script and the
perfcnt
module, only theraw-cpuid
dependency is left:And the build completes in under 4 seconds on my machine.
Therefore it would be great if the
perfcnt
module were optional. We could use a cargo feature to make it opt-in or opt-out.I have created a patch and would be happy to send a PR if desired!
The text was updated successfully, but these errors were encountered: