From: Brendan L. <bm...@ri...> - 2010-07-19 19:56:17
|
Hi Wenyuan, Just updated my branch with the threading--looks nice! For the sake of portability (actually, just me and my broken Windows environment) would you mind if I changed the calls to use the SDL_Thread API instead of pthreads? AFAIK it's just a wrapper around pthreads on most environments, so the implementation/performance should be identical. Let me know if you see any problems with changing. Cheers, Brendan On Mon, Jul 19, 2010 at 7:42 AM, Tim Holy <ho...@wu...> wrote: > Dear Wenyuan, > > On Monday, July 19, 2010 04:02:00 am Wenyuan Guo wrote: > > But it should not be problem here for the latest version: hard > > disk cache for modern OS is smart enough so that only the first read > > of each file incurs the mechanical delay. It used to be a problem in > > the earlier versions without SVG cache though, because the bottleneck > > was CPU bound then, and loading and rescaling the same sprite more > > than once add to that delay. > > Good point. Presumably if the cache got filled up we'd see a performance > hit, > but for almost any machine that can run tuxmath I doubt this will be a > problem. > > > > 6. Use David's suggestion that we (at least optionally) always have > both > > > the --fullscreen and the --windowed resolution graphics available in > > > memory. > > > After thinking over these options for a while, I think I will give 6 a > > try: in particular, we can load all cached sprites of all resolutions > > at the startup, possibly in a separate thread. Later resolution > > switches will not incur the hard disk delay this way. If my theory > > that the current 2s is mainly hard disk bound is correct, it should > > give substantial improvement for all F10 presses in-menu. > > > > Now going back to some happy coding! I will update you once the > > feature is implemented and is ready for testing. > > Exciting! > > --Tim > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Tuxmath-devel mailing list > Tux...@li... > https://lists.sourceforge.net/lists/listinfo/tuxmath-devel > |