[SDL] CPU-usage differences on winXP <-> Linux
Ryan C. Gordon
icculus at icculus.org
Wed May 30 18:17:21 PDT 2007
> strange things happen.. I have a 3 thread SDL / OGL application (main
> thread launches 1 thread for visualization & event handling, 1 for data
> reloading from hard disc). In the vis thread occurs heavy and cpu
> intensive data shifting, but not associated with SDL functions. Under
> Linux is everything fine and the program performance is acceptable, cpu
> usage @90-100%. On winXP the CPU usage lies between 0-5% and the
> performance is lousy.. Same code for both! Adjusting the nice values on
> winXp has no influence. Any ideas...? :-)
It's probably syncing to vblank every frame on Windows, which means you
won't get more than 60fps or so, and the CPU will be mostly idle.
This isn't actually a bad thing, unless your animation is counting on a
high framerate to look good...separate the drawing from framerate and
it'll be fine.
--ryan.
More information about the SDL
mailing list