Hi Dag, On 12.05.05, Dag Wieers wrote:
On Thu, 12 May 2005, Dag Wieers wrote:
I'm looking into why pytone is using +- 6.5% CPU on my 1.8Ghz laptop on normal playback. When stracing I noticed pytone is opening playerinfo every second. Instead of reopening the same file, you could do a seek(0).
Cool, but did this really yield a noticable reduction in CPU usage?
Attached is a patch that exactly does that. I also changed a little bit the flow and added an os.fsync(fd) statement. I don't think that is actually needed, but I was testing why pytone did not continued after I killed it and thought an fsync might help. (not!)
Another thing that worries me is that when stracing pytone I make it hang when exiting (ctrl-c) strace. In fact I end up killing pytone to solve the situation.
Hmm, I've never straced PyTone, but maybe that results from a thread not being properly finished.
This one actually truncates the file properly :) Sorry for that.
[... patch ...] Thanks, I'll apply that. Jörg