Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Web version of freeciv. Please mention the site you're using, if speaking things other than general freeciv-web codebase.
buzman
Posts: 20
Joined: Fri Feb 12, 2016 6:56 am

Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Post by buzman »

Hi & thanks again for the addictive freeciv fun.

I'm playing Freciv on the web, chromebook.

Not sure what is going on with the time lag but my internet connection is fine.

After a fresh load, it works ok for maybe that turn, but then lag gets worse and worse.

Let's say I command a worker to build a road...the road symbol shows up and then it takes up to "five-one-thousands" before it moves to the next unit, for me to issue a command.

The game is currently unplayable, due to the lag. :(

FYI - RE the red selection box. I did a power-wash of my chromebook, and it did not help. It's fine as long as i never press the ALT key.

-Buz
AndreasR
Elite
Posts: 754
Joined: Thu May 02, 2013 10:26 pm

Re: Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Post by AndreasR »

I'll try to fix this, buzman. Do you have some more details about this problem?
What kind of Chromebook do you use? How fast is your Internet connection?
Perhaps you could create a Youtube video showing the problem?

Is anyone else experiencing the same types of problems?

Thanks for reporting this.

Regards,
Andreas
User avatar
IZY5O
Posts: 47
Joined: Sun Jun 08, 2014 7:18 pm

Re: Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Post by IZY5O »

Hello Andreas,

I too experience this phenomenon. I'm using an iPad 2 and Safari browser.

The effect reminds me of symptoms similar to a "memory leak". After each time I save my game and hit the "Turn Done" button, the game gets slower. Eventually, my browser gives me an error message and reloads the page causing me to lose my current game and forcing me to reload my last savegame.

To avoid this, I just play one turn, save it, then end the game, then close my browser, then reload my browser and the game at the last save and play my next turn, then repeat this process. Kind of a hassle. :(

Wifi speed does not matter. I have the same problem with slow or fast connections.

-IZY.
AndreasR
Elite
Posts: 754
Joined: Thu May 02, 2013 10:26 pm

Re: Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Post by AndreasR »

I will try to improve this. Do you have some more details about the performance problems?

- What map size do you play? Does it help to reduce the map size?
- How many AI players are there in the game? Does it help to reduce the number of AI players?
- Which turn are you currently playing? Is the game fast in the beginning, and then getting slower?
- How long has the game been running? For example more than one hour?

Perhaps you can post some screenshots from a performance monitoring tool?
For example, Google Chrome can log performance like this: https://developers.google.com/web/tools ... tion?hl=en
User avatar
IZY5O
Posts: 47
Joined: Sun Jun 08, 2014 7:18 pm

Re: Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Post by IZY5O »

Hi Andreas,

Whoa! It's working much better now! :shock:

What happened? Did you fix it already?

I'll keep testing...
buzman
Posts: 20
Joined: Fri Feb 12, 2016 6:56 am

Re: Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Post by buzman »

Hi,

just played a few rounds....worked great at first, then after a few game turns, the "unit command lag" kicked in. No fun!

Saving, refreshing freeciv, and loading again is the only fix.

You should try playing via the web...after a couple of turns, the game becomes unplayable, due to unit command lag.

I use multiple wifi hot spots, so that is not a factor.

I'm on a chrome book, with the latest version of chrome os.

Reminds me of a "memory leak" problem too.

I uploaded a game file for you.

Thanks again.

-Buz
freecivweb-buzman of the Aztec in year- 1774CE (T263).zip
works great at first!
(68.59 KiB) Downloaded 405 times
Attachments
Screenshot 2016-07-05 at 7.45.45 PM.png
buzman
Posts: 20
Joined: Fri Feb 12, 2016 6:56 am

Re: Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Post by buzman »

Screenshot 2016-07-05 at 8.00.55 PM.png
Screenshot 2016-07-05 at 8.00.55 PM.png (122.94 KiB) Viewed 12720 times
The "S" command you see above took over five seconds to complete....YIKES! (after my first game turn...)
buzman
Posts: 20
Joined: Fri Feb 12, 2016 6:56 am

Re: Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Post by buzman »

Just checking in...lag is still a problem, and it is still taking a long time to make unit commands.

Buz - Chromebook - Web Client

FYI: Turning off sound does not help. Changing screen from a zoom to 100% normal, seems to help a bit.
Screenshot 2016-08-09 at 6.jpg
Let me know if you want me to do anything on my end.

Thanks again...."Just because Civilization should be free!"

-Buz
Attachments
freecivweb-buzman of the Jamaican in year- 1758CE (T255).zip
(42.86 KiB) Downloaded 363 times
AndreasR
Elite
Posts: 754
Joined: Thu May 02, 2013 10:26 pm

Re: Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Post by AndreasR »

What is your screen resolution? How fast is your CPU?

Does it help to reduce the browser window size?

I suspect that your Chromebook is not fast enough to render the map in a good frame-rate. Unfortunately rendering the isometric graphics of Freeciv using Javascript and HTML5 canvas can be a bit slow on computers with a slow CPU.
Hans Lemurson
Veteran
Posts: 108
Joined: Mon Aug 22, 2016 10:25 pm

Re: Unit Action Lag-Time - YIKES! - Unplayable "Five-one-thousand" delay per unit

Post by Hans Lemurson »

I too have found that the lag time in processing orders increases as the game goes on. Saving and reloading cleared it up, but it started to slowly increase again as I kept playing.

Even at the best of times though (and independent of the order-processing latency) the Web App is burning CPU cycles like crazy. On the main map it uses nearly the full power of 2 of my 4 CPU cores (2.6Ghz).
FreeCiv CPU usage.PNG
Wishes he could convert Civ2's scenarios to FreeCiv...
But instead, he made his own tileset variants, RoundSquare and Sextant-enHANSed, and refuses to play on anything else. Check them out!
Post Reply