muse / Captain

A dynamic lemonbar script written almost entirely in bash.
MIT License
49 stars 5 forks source link

Spawning 100s of processes #11

Closed ramblingenzyme closed 3 years ago

ramblingenzyme commented 8 years ago

Since I synced with master to try out the feature added in #10, having "captain &" at the end of my bspwmrc has caused it to create and destroy 100's of processes, leading to close to 100% CPU usage. I have just about no clue why, because killing all of the processes and launching "captain &" in a terminal did not cause this problem.

neeasade commented 8 years ago

this would happen if the reload command you were watching for to launch things outputted many lines really fast -- is this with defaults in repo? I wonder if the bspc subscribe call outputs lots of lines as the bspwmrc concludes, unsure.

ramblingenzyme commented 8 years ago

That makes sense, and I seem to have pinpointed the culprit to pactl subscribe, so...this is might not be an issue. It was leaving lots of processes around in memory though, so something to keep in mind I guess?

neeasade commented 8 years ago

yeah, had not considered that problem previously, hm.

neeasade commented 8 years ago

so, on start, does pactl subscribe output vary? perhaps in recieving script you could filter for desired output before printing -- that would solve the 100's of unwanted processes if they were caused by misc startup info being printed.