atg / chocolat-public

Public bug tracker for the private chocolat project
http://chocolatapp.com
180 stars 4 forks source link

App spawns rustc processes that stick around after closing #1730

Open fenhl opened 9 years ago

fenhl commented 9 years ago

Chocolat spawns a process tree like the following when a .rs file is opened:

─┬= 99671 fenhl /opt/homebrew-cask/Caskroom/chocolat/latest/Chocolat.app/Contents/XPCServices/com.chocolatapp.Chocolat.fpc.xpc/Contents/MacOS/com.chocolatapp.Chocolat.fpc
 └─┬─ 99672 fenhl /bin/bash -- /opt/homebrew-cask/Caskroom/chocolat/latest/Chocolat.app/Contents/SharedSupport/building/rust/rustc [default]/diagnose.sh
   └─┬─ 99673 fenhl /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python diagnose.py
     └─┬─ 99674 fenhl /bin/sh /usr/local/bin/rustc --no-trans --color never --crate-type lib -L /opt/git/github.com/jq-shell/jqsh/master/target /opt/git/github.com/jq-shell/jqsh/master/target/deps /opt/git/github.com/jq-shell/jqsh/master/src/lang/channel.rs
       └─┬─ 99684 fenhl /bin/sh /usr/local/bin/rustc --no-trans --color never --crate-type lib -L /opt/git/github.com/jq-shell/jqsh/master/target /opt/git/github.com/jq-shell/jqsh/master/target/deps /opt/git/github.com/jq-shell/jqsh/master/src/lang/channel.rs
         └─┬─ 99685 fenhl /bin/sh /usr/local/bin/multirust ctl override-toolchain
           └─┬─ 68350 fenhl (sh)
             └─── 68352 fenhl (sh)

However, these processes stick around after the file is closed and even after Chocolat is quit, and hog the CPU significantly:

Activity Monitor screenshot of me quitting Chocolat and then killing the background process

The first sudden decrease in CPU load is me quitting Chocolat (which had only one .rs file open and nothing else), and the second one is me killing process 99685.

Affected versions: 3.1.4.