The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: gerw on June 16, 2009, 05:24:10 PM

Title: [patch] profiling without graphics
Post by: gerw on June 16, 2009, 05:24:10 PM
With this patch (and compiling with PROFILE = 2) graphic will be disabled for more accurate profiling of the computational parts. Fast forward will be set directly. Usage of the switches "load" and "until" is recommended ;)

www.tu-chemnitz.de/~gerw/patches/profile.patch (http://www.tu-chemnitz.de/~gerw/patches/profile.patch)


(stdlib.h in koord.h is needed when comiling without DEBUG, at least at ubuntu).
Title: Re: [patch] profiling without graphics
Post by: prissi on June 16, 2009, 10:14:21 PM
Since I need a server version for network without display, I planned the same stuff. But it must hide also the banner and must not use fast forward, thus same but different in this case ...
Title: Re: [patch] profiling without graphics
Post by: gerw on June 17, 2009, 07:19:56 AM
The profiling version actually has a display, but it's not used. But for the server, it's of course better, when it hasn't a display at all. I guess, we need a simgraph0.cc with 0 bit graphic ;)

Should I have a look on it?
Title: Re: [patch] profiling without graphics
Post by: prissi on June 17, 2009, 09:35:15 AM
I think most changes are rather needed to the event system and such, i.e. apart from not calling the update, there is also no need for an event loop. At least for windows and the SDL version. There could be a simsys_posix.cc or so, that takes care of that and simply just not init graphics (or only a default 64x64 pixel thing .... Because simgraphics is doing nothing really system related. It could be kept and not affecting the total system much.
Title: Re: [patch] profiling without graphics
Post by: gerw on June 18, 2009, 03:47:53 PM
New version tu-chemnitz.de/~gerw/patches/profile_v2.patch (http://tu-chemnitz.de/~gerw/patches/profile_v2.patch).

It contains simgraph0 and simsys_posix, which provides a full 0-bit graphic :D
Title: Re: [patch] profiling without graphics
Post by: jamespetts on June 18, 2009, 03:50:22 PM
Ahh, zero-bit graphics: that's almost as good as monochrome ;-)
Title: Re: [patch] profiling without graphics
Post by: gerw on August 30, 2009, 01:56:47 PM
Small update. Could you apply this patch with Tortoise?

http://www-user.tu-chemnitz.de/~gerw/patches/profile_v3.patch (http://www-user.tu-chemnitz.de/~gerw/patches/profile_v3.patch)
Title: Re: [patch] profiling without graphics
Post by: gerw on October 11, 2009, 09:13:10 PM
In trunk.

(stdlib.h is included in koord.h twice).