-
Notifications
You must be signed in to change notification settings - Fork 71
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
Sourcing large number of exports is very slow, or hangs indefinitely #77
Comments
Unfortunately, this is a side effect of Bass recently moving from using a temp file to using FIFO pipe for reading all environment variables. On MacOS, the pipe buffer is 16k and it is not changeable from Python. On Linux, this might be fixable by setting |
I see, thanks.
That's not really ideal when, as is the case here, it's a third party file. In this case it might be safe since each line should always be independent - but the one I actual want to source is |
@edc Could we perhaps have a flag to say |
I don't have plan to implement that in the short to medium term, especially because Bass does not really parse flags properly. But I definitely welcome patches. |
No problem, thanks; it is a recurring itch for me, so I may get around to scratching it.
For my own reference, this change was in #33. |
I think I have the same issue. We have a shell script which we need to source for a project. It includes a lot of large environment variables. Whenever I do I've been using this #83 to mitigate the issue. I haven't touch Python for a while and I didn't dive into hunting down the root cause. But do have a look and see if this fixes the problem. |
I merged #83. Thanks for the fix! |
Thanks! I'll certainly give that a go, and close if that resolves mine too. Cheers. |
@OJFord This is good to close? |
@edc Sorry for the delay. Snappy: fish$ bass -- source large_file.sh
bash$ set -o allexport ; source large_file.sh
bash$ eval 'set -o allexport \; source large_file.sh' Hangs: fish$ bass -- set -o allexport \; source large_file.sh |
For example, with this large (2126 LoC at time of writing)
$file
:https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/lib/i_material.sh
hangs longer than I care to wait - certainly non-linearly longer than this
$file
, which is only about 3/8 the size and takes <200ms:https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/lib/i_fa.sh
The text was updated successfully, but these errors were encountered: