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

Make spinners spin more slowly #3808

Open
eschnett opened this issue Feb 24, 2024 · 2 comments · May be fixed by #3809
Open

Make spinners spin more slowly #3808

eschnett opened this issue Feb 24, 2024 · 2 comments · May be fixed by #3809

Comments

@eschnett
Copy link

I was updating Julia packages over an unstable internet connection and I didn't like how fast the spinners were running. I think they spin about twice per second.

I looked at the Pkg.jl code, and I found that setting the environment variable CI=true would disable all progress output. That's good, but I was looking for something fancier – just slowing down the progress output, not eliminating it.

I think it would be possible to make the spinner speed configurable with a rather small code change. I think this line

Pkg.jl/src/API.jl

Line 1389 in e7e8ce3

t = Timer(0; interval=1/10)
defines how fast the spinners are.

One could add a new global variable

const PRECOMPILE_SPINNER_INTERVAL = Ref(0.1)

to the code, and then create the Timer via Timer(0; interval=PRECOMPILE_SPINNER_INTERVAL[]). This would allow changing the spinners by setting a global variable. A similar mechanism is already used in MiniProgressBars.jl where two variables are defined

const PROGRESS_BAR_TIME_GRANULARITY = Ref(1 / 30.0) # 30 fps
const PROGRESS_BAR_PERCENTAGE_GRANULARITY = Ref(0.1)

@eschnett eschnett linked a pull request Feb 24, 2024 that will close this issue
@KristofferC
Copy link
Member

How does the precompile spinner relate to your internet connection?

@eschnett
Copy link
Author

I was logged in via a slow connection and issued an ]update command from the Julia REPL, which lead to precompiling a few package that take a minute to do so (CairoMakie?) while showing the spinners. The spinners didn't spin smoothly.

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 a pull request may close this issue.

2 participants