i used Instruments.app from XCode. you just have to launch it and filter on the "seamstress" process name.
we get:
from a 30s run, we can see that 2 threads are responsible for the most of the CPU time, both linked to ableton link (clock.Link_Beat_Reference.loop and clock.Fabric.loop).
the other loops take way less CPU time in comparison.
the "fix"
my fix certainly isn't right or the best way to proceed.
adding a sleep at the begining of the clock.Link_Beat_Reference.loop seem to drastically reduce the CPU usage by half. ableton link seem to still continue working.
doing the same thing to clock.Fabric.loop seems to make seamstress very laggy.
so there are more stuff to explore but the issue is around those 2 threads.
thank you so much for looking into this, i was truly mystified. 13% CPU on my machine with the change i just pushed feels much more reasonable... i'll go ahead and merge!
identifying the source of high CPU usage
i used
Instruments.app
from XCode. you just have to launch it and filter on the "seamstress" process name.we get:
from a 30s run, we can see that 2 threads are responsible for the most of the CPU time, both linked to ableton link (
clock.Link_Beat_Reference.loop
andclock.Fabric.loop
).the other loops take way less CPU time in comparison.
the "fix"
my fix certainly isn't right or the best way to proceed.
adding a sleep at the begining of the
clock.Link_Beat_Reference.loop
seem to drastically reduce the CPU usage by half. ableton link seem to still continue working.doing the same thing to
clock.Fabric.loop
seems to make seamstress very laggy.so there are more stuff to explore but the issue is around those 2 threads.