Hi,

> Gesendet: Montag, 26. Dezember 2016 um 20:44 Uhr
> Von: "Enrico Weigelt, metux IT consult" <enrico.weig...@gr13.net>
> An: freecol-developers@lists.sourceforge.net
> Betreff: Re: [Freecol-developers] getGame() + getSpecification() calls
>
> I'm not so confident w/ java profiling, so any tips appreciated.
> 

>From what I remember when doing it some time ago, the client-server 
>communication
looks as if it was a hotspot, but I think thats wrong as its counting
waits on sockets as if they used processor time. The xml parsing also
contributed some.
The real hotspot is MapViewer.displayMap, as there are huge nested loops,
but I already improved it some. It ends up inside simple stuff like Map and,
for example, Map.getTile gets called a huge number of times, such that a small
improvement there could be huge.
One really bad spot called from the map display is ImageLibrary.getStringImage
and if you could reimplement the outlined text drawing in some clever way,
without the very slow getRBG and setRGB calls, it would be a nice improvement.

> > Or indeed, imagine that you went ahead and turned all the game objects
> > into suitable singletons and accessed them that way, *and* measured the
> > difference --- let me speculate the gain would be *tiny* if anything as a
> > lot of those calls will be getting auto-inlined anyway.
> 
> Does the inlining also happen on bytecode level - before jit gets active
> ? The reason for my question: according to the jre docs,
> methods have to be called 1k times before jit starts.

I think that wont matter for performance, but I have a dislike for singletons,
as they hide dependencies and encourage them. If you insist on trying to improve
that, you should instead try to have less classes need access to those often
shared references.

> > I am sorry I keep arguing with you, I really appreciate that you want to
> > improve the FreeCol codebase, but we need to put our effort into stuff
> > that is *broken*.
> 
> Okay, which ones do you suggest ?
> 

If you reimplemented GUI.createMiniMapThumbNail it would be appreciated, as
it is bad reuse of the gui class drawing the ingame minimap and
IIRC it is still bugged in that the map editor does not save a thumbnail image.


Greetings,

wintertime


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to