I'm using several plugins that use set_timeout to create a background-ish task (the function calls set_timeout(fn, 1000) where fn is the function itself). This seems to cause major CPU usage issues over time. At startup it isn't a big deal, but if I leave the editor running for more than 30-45 minutes CPU goes through the roof. Sample shows that the vast majority of time is being spent running NSDelayedPerforms, which is why I suspect set_timeout (I might be entirely wrong there though). Is there a better way to handle this? It would be nice if there was an event callback which was just called every X seconds or frames, or just a recurring version of set_timeout. http://paste.pocoo.org/show/353706/ has the full sample output if it helps.

This normally indicates that these plugins call themselves multiple times per round. I had this some minutes ago while writing a plugin using set_timeout and saving it multiple times. I've written a little workaround for detecting if a reload of the module has been done.But I can also say that set_timeout seems to be really expensive on the CPU.

Thanks for the detailed report - it seems the issue will arise whenever there is more than one periodic task running via set_timeout. It effects OSX and Linux, the Windows implementation doesn't have the same flaw. I'll fix it for the next version.

Definitely seeing a change, but the issue persists. A new sample from 2051 is up at http://paste.pocoo.org/show/356436/. On my 2.4GHz Core 2 Duo MBP this is still using 50% of the CPU after a while. Not sure what the issue is, since I don't see anything anomalous in the sample data.