-
Notifications
You must be signed in to change notification settings - Fork 220
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
toolbox run
is too slow
#654
Comments
toolbox is running podman cli for checking stuff, each time a cli is executed, there is a 300 - 500ms latency. |
One problem is that that the The second This is caused by the inherent difficulty in figuring out the presence of the binary. I wonder if there's a smarter way to go about this. |
maybe we can just run podman exec, and if it errors, we fall back to /bin/bash ? |
Is there a purpose to run all those checks once the container is up ? |
Umm... we likely can't because:
(This is what I tried to explain in words, but it's a bit confusing.) So, if we just checked for 127, then in the latter case Toolbox would spawn another instance of Bash after the first instance was quit. |
I think one option is to shuffle the code around, so that we can examine the causes of |
What if we just let it error ? Just what if, this could also potentially solve #657 ? |
This was done in #813 (which requires the follow-up fix in #872). We now attempt the non-fallback behaviour directly without doing any checks. If that fails, we invoke This should have sped up
I think we can't just it error out, because it would make things difficult for users who use a shell that's not present in the Toolbox image. eg., Z shell. In such cases, it's good to fallback to Bash inside the container, so that users have the chance to install their favourite shell. |
I am going to close this now. Please feel free to re-open this issue or file a new one, if you think that |
Thanks @debarshiray it is indeed noticeably faster now. |
toolbox run date
seems to always have at least 2s delay, there is more delay depending on a application being run.It seems that toolbox always runs checks regardless of container already being running or not, is there a way to tweak this so it behaves a little bit more like
podman exec
?Usually 2-6 seconds delay wouldn't be a big deal however I am trying to run some applications to avoid altering silverblue's core os and this is noticeable.
The text was updated successfully, but these errors were encountered: