Sublime Forum

Intermittent long hang time before build starts

#1

Hey there. I would like to make a bug report, but I have no clue what is causing this. I’m on MacOS, and this issue happens on verison 4200 and 4192. Basically, I’m running a build command for Odin:

{
	"shell_cmd": "~/Odin/odin run .",
}

And the build will hang for 5-30 seconds before it starts. Really, there’s always a bit of a delay compared to the macOS terminal, but I’m not sure if this normal delay is related.

I really just don’t know how to even investigate what could be causing this, and would love some pointers. I’ve confirmed this doesn’t happen in the macOS terminal.

0 Likes

#2

Hey there. Any tips would be appreciated. I’m getting basically zero from both sides here, very hard to pin down this issue. Issue is still happening from a bare Sublime install and a minimal Odin program. To restate, long build time doesn’t happen from normal terminals. It seems like the build time speeds up once something is cached or something, but the long (looooong, 10-40 seconds) build delay always returns. I really have no clue. If posting any sort of log or something would be helpful, please let me know.

0 Likes

#3

Given ST just uses plain simple standard python API to spawn a bash shell to run given shell_cmd there’s no obvious reason for any noticible startup delays.

The only possibility might be some expensive .bashrc scripts, which delay bash startup or something along those lines.

0 Likes

#4

Thanks for the reply. Mac defaults to zsh these days, and I don’t have a .bashrc in my home folder. (Anyway, I’ve never been able to get sublime to use these in the first place, which is why my shell_cmd in my first post has the full path "~/Odin/odin run .") Would sublime have one somewhere else? Anyway, here is my .zshrc and .zprofile:

.zshrc:

# Turn off all beeps
unsetopt BEEP
# Turn off autocomplete beeps
# unsetopt LIST_BEEP

path+=~"/code_resources/helix"

alias eleventy_serve='npx @11ty/eleventy --serve'
alias eleventy_build='npx @11ty/eleventy'
alias sass_watch='sass --watch scss:css'
alias metal='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal'
alias metallib='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metallib'

export PICO_TOOLCHAIN_PATH=/Applications/ArmGNUToolchain/14.2.rel1/arm-none-eabi

# >>> juliaup initialize >>>

# !! Contents within this block are managed by juliaup !!

path=('/Users/arxi/.juliaup/bin' $path)
export PATH

# <<< juliaup initialize <<<

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

.zprofile:


# MacPorts Installer addition on 2025-01-25_at_11:35:08: adding an appropriate PATH variable for use with MacPorts.

setopt noautomenu

export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.

export PATH=~"/Odin:$PATH"
export PATH=$PATH:/opt/homebrew/bin
export MGFXC_WINE_PATH=/Users/arxi/.winemonogame
export PATH=~"/go/bin:$PATH"
export PATH=~"//Library/Python/3.9/bin:$PATH"

export PLAYDATE_SDK_PATH="/Users/arxi/Developer/PlaydateSDK"
0 Likes

#5

ST spawns bash regardless MacOS’s default login shell for portability reasons. ST priorizes equal behavior accross platforms and thus prefers posix compatible bash on Mac and Linux.

ST doesn’t confugure anything bash related, thus OS defaults apply.

The only other cause for a delay may be ST as an GUI app running separated from any login shell. Maybe some OS related security meassures aure involved. But am not the one to provide sophisticated support for anything Mac related.

0 Likes