Page 1 of 2

Slow Production List

Posted: Fri Feb 01, 2019 6:52 am
by Grokem
Been playing FreeCiv forever with no problems on Linux, Windows and Mac. As of the 2.6.x beta builds, the production list in the city dialog has become unusable slow. It seems to be tied to the number of cities or the number of turns into the game, I haven't been able to figure out which. When the game first starts everything is fine but the game quickly slows down to the point that modifying the production list is a ~20s operation by the 1500s as the entire game freezes up for a bit. I can add multiple items to the list and it just incurs the same ~20s delay. Opening the city dialog incurs the same ~20s delay. Toward the end of the game the delay can be over 60s for each operation. The rest of the game is super fast.

Current Game:
Version: 2.6.0 GTK
Year 1840
Map Area 4k tiles
My Cities 174 (Only one AI left and they might have 30 cities)
Production Modification time: ~60s

Re: Slow Production List

Posted: Sun Feb 03, 2019 9:39 pm
by Grokem
I'm not so much looking for anyone to solve this but more to just tell me if it's something I'm doing or my machine? Like I said, I've been playing FreeCiv for a long time, probably 20 years and never had any issues like this. I've tried it on VMs but they were in general slow so i felt like that wasn't a good test. If I could just get some guess if this is a bug in 2.6.x or it's me.

Re: Slow Production List

Posted: Mon Feb 04, 2019 3:12 pm
by nef
See my report item #3

Re: Slow Production List

Posted: Sat Feb 16, 2019 7:23 pm
by Grokem
nef wrote:See my report item #3


Ah, thanks for confirming the problem. I didn't read that thread as it seemed to not be the problem I was experiencing. I am able to finish games but only at small map sizes and by avoiding opening the city dialog as much as possible. Really makes me want to get a Freeciv build environment running and fix this problem now that I know it's code.

The only other problem that drives me crazy is the bad centering. Using <c> to center looks like it only centers the x or y, not both. I haven't paid enough attention to figure out what the exact nature of the problem is as now I've just grown muscle memory to hit <c> twice as the 2nd time it centers on the other axis.

Re: Slow Production List

Posted: Mon Feb 18, 2019 11:49 am
by nef
The only other problem that drives me crazy is the bad centering. Using <c> to center looks like it only centers the x or y, not both. I haven't paid enough attention to figure out what the exact nature of the problem is as now I've just grown muscle memory to hit <c> twice as the 2nd time it centers on the other axis.
8. International Date Line.

Re: Slow Production List

Posted: Mon Feb 18, 2019 11:53 am
by nef
An update to the original problem: seems that 'time' since last restart is a - or - the factor. Maybe turns and/or activity with City DB since last restart. Suggests to me that this could be a GTK problem.

Re: Slow Production List

Posted: Tue Feb 19, 2019 10:48 pm
by cazfi
nef wrote:this could be a GTK problem.

What's your gtk version?

Re: Slow Production List

Posted: Mon Feb 25, 2019 1:08 pm
by nef
Help tells me:

Code: Select all

This is Freeciv version 2.6.0, gui-gtk-3.0 client.
Built against gtk+ 3.8.2, using 3.8.2
Built against glib 2.36.1, using 2.36.1

Re: Slow Production List

Posted: Mon Feb 25, 2019 1:42 pm
by cazfi
Extremely old gtk+-3 version.... which also happens to be latest which we have available for msys1 based Windows builds. Are you using that? If so, can you test if problem is present also with msys2 based build from http://files.freeciv.org/packages/windo ... ses/2.6.0/ ?

Previously (before freeciv-2.6) you have probably been using gtk2-client (default until freeciv-2.6) instead of gtk3-client (default in freeciv-2.6).

Re: Slow Production List

Posted: Tue Feb 26, 2019 7:54 am
by Grokem
cazfi wrote:Extremely old gtk+-3 version.... which also happens to be latest which we have available for msys1 based Windows builds. Are you using that? If so, can you test if problem is present also with msys2 based build from http://files.freeciv.org/packages/windo ... ses/2.6.0/ ?

Previously (before freeciv-2.6) you have probably been using gtk2-client (default until freeciv-2.6) instead of gtk3-client (default in freeciv-2.6).


I had the same version of gtk+ that Nef had, 3.8.2. I uninstalled FreeCiv 2.6.0 and installed the version "Freeciv-2.6.0-msys2-win64-gtk3.22-setup.exe" and verified in help that I was now running gtk+ 3.22.16. I started up a map and increased the size to 8k tiles and built 150 cities with 5 AI players. I can't be sure at this stage of the game since my goal was to leave the other AI players alone so they could build cities but I would guess there are at least 600 cities on the map.

I no longer have speed issues with the cities map. I still experience some very small double click issues when adding production but they are not bad and not consistent. I think a lot of it has to do with the auto scrolling the available production list when adding production to a city. This is a terrible feature that not only slows down the game itself, but makes it much harder to quickly add several items in the correct order I want them produced. This is a very minor problem compared to the slow city dialog, just thought it was worth mentioning in regards to the only hint of slowness left.

Centering is mostly fixed but still not perfect. It's much better than it was and at least gets the unit on screen. Overall this took the game from unplayable to much better than 2.5.x. Thanks for all the help.