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

Remove the semi-secret logging #1091

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Remove the semi-secret logging #1091

merged 1 commit into from
Sep 19, 2023

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Sep 19, 2023

Rayon has long had some logging functionality, but not well advertised.
The only mention is in the (private) module docs:

To use in a debug build, set the env var RAYON_LOG as
described below. In a release build, logs are compiled out by
default unless Rayon is built with --cfg rayon_rs_log (try
RUSTFLAGS="--cfg rayon_rs_log").

Note that logs are an internally debugging tool and their format
is considered unstable, as are the details of how to enable them.

I, for one, have not "internally" used this for debugging at all, yet it
comes at some cost to all users, even disabled in release builds. At the
very least it requires crossbeam-channel that we're not using anywhere
else except tests. Besides that, this code also bloats the compiled size
of rayon-core by about 30%, and similar for its compile time.

So let's just rip out the logger!

The remaining uses of crossbeam-channel in test cases are easily
avoidable too, since std::sync::mpsc::Sender is now Sync.

Rayon has long had some logging functionality, but not well advertised.
The only mention is in the (private) module docs:

> To use in a debug build, set the env var `RAYON_LOG` as
> described below.  In a release build, logs are compiled out by
> default unless Rayon is built with `--cfg rayon_rs_log` (try
> `RUSTFLAGS="--cfg rayon_rs_log"`).
>
> Note that logs are an internally debugging tool and their format
> is considered unstable, as are the details of how to enable them.

I, for one, have not "internally" used this for debugging at all, yet it
comes at some cost to all users, even disabled in release builds. At the
very least it requires `crossbeam-channel` that we're not using anywhere
else except tests. Besides that, this code also bloats the compiled size
of `rayon-core` by about 30%, and similar for its compile time.

**So let's just rip out the logger!**

The remaining uses of `crossbeam-channel` in test cases are easily
avoidable too, since `std::sync::mpsc::Sender` is now `Sync`.
@cuviper
Copy link
Member Author

cuviper commented Sep 19, 2023

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 19, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit dc7090a into rayon-rs:master Sep 19, 2023
4 checks passed
@cuviper cuviper deleted the no-logger branch September 20, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant