On 24.01.2017 12:12, Michael T. Pope wrote: > Always the performance... for the nth time, show me that it is a problem!
Well, eg. up to several seconds delay on map move, etc actually is a problem - at least for me ... >> I've seen that abilities are checked a lot, and >> the current implementation isn't particularily efficient. In >> FeatureContainer I've already optimized hasAbility() to do direct >> lookup in the set(s) and bail out as fast as possible (w/o going >> through getAbilities()). > > Which will break any class (e.g. Unit) that needs special handling and > relies on hasAbility calling the overridden getAbilities. Clarification: I was just talking about FeatureContainer - haven't seen a derived class of that yet. fco+childs are a different issue (I'm not there yet). > But, once again, and I am getting sick of repeating this, show me where > FreeCol is being hurt by this. I have some rough numbers. Your turn. Haven't done any *real* benchmarking yet, just seeing a slow UE. And when doing some individual traces here and there, they're looking horribly complex. I'll yet have to check how it performs on ARM. Assuming, jdk8 meanwhile doesn't crash so quickly anymore. >> And it requires jdk8, which I have on none of my production machines, >> running stable/lts distros (and properly packaging that monster is a >> magnitudes larger job). > > Sorry. Java8 is not negotiable. Does that mean, using j8 stuff whereever possible, just for its own sake ? > Java7 is no longer getting security updates. LTS distros still do it. (OTOH, for plain desktop applications, the pressure isn't that high anyways.) > If you want to claim your code is "more expressive" I would expect it to be > shorter. Not if it hides important from the human reader. And in such procedural languages, types are indeed important. (in functional languages, that might be different, but Java is nowhere near to functional). > It *is* more "explicit" in that you are correct that the types are more > obvious, > but I do not consider that an advantage over being succinct. For me it *is* important. Everytime I see such an expression, I'll have to look up which the actual types, to understand what's really going on here, just because some people wanna save a few keystrokes ... And I dont wanna waste so much memory for all the temporary objects, (my notebook only has 8GB RAM, that has to be shared w/ lots of other applications), and also I don't wanna burn too many cpu cycles - having the fan on max all the time isn't actually comfortable. >>> This is obviously not >>> definitive as a lot of other code went in at the same time, but certainly >>> suggestive that Streams have negligible impact, and even if Streams are >>> fully to blame for the change, I am *not* worried that it now takes 7 AI >>> players 5.2s to move rather than 5.1s. >> >> On my site it's magnitudes smaller. Haven't looked at the whole AI area >> yet, my next 2do is the startup, which still is uncomfortably slow ... > > So *what* exactly is "magnitudes smaller"? Sorry, a bit fallen over --- AI is magnitudes slower here. In larger games (when the AIs have lots of colonies and units), up to a minute per turn. That's the point, where it really doesn't make fun anymore. > However I expect you will find that most of > the time is I/O, sending the XML for the Game to the client. Yeah, already suspected that. Maybe I'll just replace the XML bloat by something thinner and faster ... (or maybe just a faster xml parser) --mtx ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/freecol-developers
