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

Feature flag to disable rayon for benchmarking purposes #161

Closed
rj00a opened this issue Nov 29, 2022 · 1 comment
Closed

Feature flag to disable rayon for benchmarking purposes #161

rj00a opened this issue Nov 29, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@rj00a
Copy link
Member

rj00a commented Nov 29, 2022

While benchmarking Valence, the graph produced by cargo flamegraph is very difficult to understand due to rayon polluting the output (see this issue). Ideally a solution will be implemented upstream, but until then we'll have to come up with our own workaround.

I suggest adding a feature flag to valence named sequential. When enabled, all uses of rayon iterators internally will be replaced with their sequential counterparts. This flag should have no influence on the public API.

One idea I had was to make a rayon_shim module which could simply be glob imported. Then we won't have to sprinkle #[cfg(feature = "sequential")] all over the place.

@rj00a rj00a added the enhancement New feature or request label Nov 29, 2022
@rj00a
Copy link
Member Author

rj00a commented Dec 1, 2022

Decided that this was too annoying to maintain. RAYON_NUM_THREADS=1 gets close enough.

@rj00a rj00a closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant