Skip to content

Call to curl --version on every shell-maker-submit call can adversely impact user experience #32

Description

@carlosdagos

G'day :)

I noticed that shell-maker-submit uses shell-maker--clear-input-for-execution which then calls shell-maker--curl-version-supported, which runs curl --version.

For some reason my (homebrew installed) curl takes a loooong time to execute.

Check out this disaster NOTE: Intentional omissions with [...]. The first call is homebrew `curl` and the second is macOS-default `curl`.
$ time curl --version
curl 8.19.0 (aarch64-apple-darwin25.3.0) [...]
________________________________________________________
Executed in    5.06 secs      fish           external
   usr time   31.36 millis    0.70 millis   30.66 millis
   sys time   23.92 millis    2.88 millis   21.04 millis

$ time /usr/bin/curl --version
curl 8.7.1 (x86_64-apple-darwin25.0) [...]

________________________________________________________
Executed in   35.60 millis    fish           external
   usr time    8.04 millis    0.58 millis    7.46 millis
   sys time   11.87 millis    2.63 millis    9.25 millis

While issues with my installation of curl are not necessarily a concern for shell-maker, the matter of fact is that we're doing IO with every shell-maker-submit and if this IO takes slightly longer than expected 1 then the user experience is degraded because doing a sync call like that on every submit blocks emacs entirely for the amount of time the IO takes.

I'm wondering if there's something we can do about this. Perhaps we can cache the result of curl --version on shell-maker startup? Or on the first shell-maker-submit for a specific buffer?

Happy to hear your thoughts :)

Thank you so much!

Footnotes

  1. This can happen for a number of reasons, like different types of antivirus solutions installed in target machines. ↩

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions