On Tue, Nov 21, 2006 at 09:01:53PM +0100, Dominic Sacré wrote:
On Tuesday 21 November 2006 18:50, Fons Adriaensen
wrote:
It comsumes a lot of CPU if you use many
channels.
On my 2 Ghz P4, 16 channels take 94%. Almost all of this
is taken by X11, which indicates that there's something
strange.
I assume you're using SDL. If you can, try OpenGL, that should take most
of the work off the CPU.
Rather the opposite, see below.
Another thing you could try is to change both
occurences of SDL_HWSURFACE
in video.h to SDL_SWSURFACE. Does it make any difference? On my machine
it doesn't, so I wasn't sure what to use.
It does help a bit, but not with -g:
| -g
---------------------
HW | 33% 94%
SW | 22% 93%
Also note that currently, even in non-scrolling mode,
jack_oscrolloscope
redraws the whole window on every frame, because was easier to implement.
Changing that is somewhere on my todo list :)
Probably something you should do. I've got an almost identical app
(Yass - not yet released). With 100 updates per second, 32 channels,
and the maximum scrolling speed it takes less than 1% of available CPU.
So it's definitely not X11 taking all the time.
--
FA
Lascia la spina, cogli la rosa.