MegaGlest Forum

MegaGlest => Bug reports => Topic started by: Ishmaru on 31 August 2013, 00:47:23

Title: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: Ishmaru on 31 August 2013, 00:47:23
Couldn't help but notice the lag when switching between tech trees. The amount of latency is far greater than previous versions of MG (below 3.8.0). At first I thought it was due to faction previews being loaded, but it appears not to be the case. lag is still the same for techtrees with or without faction previews or videos.

Have anyone else seen this issue?

I'm running on Laptop with Windows 7, Intel 2nd Gen Core i7 i7-2670QM / 2.2 GHz ( 3.1 GHz ) ( Quad-Core ), 8 gigs ram, + NVIDIA GeForce GT 540M

PS there is also no errors noted.
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: titi on 1 September 2013, 22:26:30
I think this is related to the new techtree translation. In the moment you selected the techtree its directory is scanned for translations. Its hard to say why this takes long for you :-( . Maybe slow harddisk or more lickely an antivirus programming checking too much.
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: -Archmage- on 1 September 2013, 22:32:09
I think this is related to the new techtree translation. In the moment you selected the techtree its directory is scanned for translations. Its hard to say why this takes long for you :-( . Maybe slow harddisk or more lickely an antivirus programming checking too much.
Why does all this scanning cause the game to freeze for a few seconds. Can't it scan without freezing it?
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: filux on 2 September 2013, 03:59:34
...Maybe slow harddisk...

From my experience I can say that it isn't a slow disk, unless it is defective.
Then looks like problem is related to windows and/ or ativirus.
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: Ishmaru on 2 September 2013, 04:33:08
why is is scanning translation done in custom game menu? wouldn't this be better to be loaded with the rest before map is loaded?

would it be possible to have a switch in options menu?
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: -Archmage- on 2 September 2013, 04:40:17
Megaglest tends to load everything when you click something. Either make it so it doesn't cause lag, or pre-load everything ahead of time? Both would be magical.
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: filux on 2 September 2013, 05:02:44
why is is scanning translation done in custom game menu?...
If it is there, then you can see translated name of the tech tree and of the factions.
In my opinion it is a very positive function.

Normally the switching between tech trees (e.g. for me and for many other people) is almost instant.

The only exceptions known to me it can actually take a long time is:
1. Switching between tech trees on headless server if you have locally more tech trees.
2. Switching to bugged tech tree.

Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: Ishmaru on 2 September 2013, 23:46:25
then why does it take just as long if a tech tree doesn't have a translation?
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: filux on 3 September 2013, 00:46:50
That is very good question. It seems that there may be a problem with your hardware/software.

On the 3.8.0-beta1 and latest svn I have no problem to switch tech tree around 100 times within 15 seconds (and I haven't tried faster).
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: tomreyn on 3 September 2013, 01:08:07
So this issue only seems to affect Windows users (at least not Linux users), and it may or may not affect all Windows users. We will need more feedback here to be able to tell whether this is a generic issue on Windows or one only affecting some Windows versions, and whether this issue does still occur with all anti virus and anti malware software disabled.
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: -Archmage- on 3 September 2013, 03:38:09
I'm running MG on an SSD and still getting lag. I'll record it.

https://www.youtube.com/watch?v=aaWu7Yr-5_E&feature=c4-overview&list=UUPXEhQHaJpuFN6jTAAUCvwA
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: Ishmaru on 3 September 2013, 04:12:23
I just want to note, the lag seems to be a one time issue (at least till i shut down my computer/restart).
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: titi on 3 September 2013, 08:18:36
I just want to note, the lag seems to be a one time issue (at least till i shut down my computer/restart).

This is a very strong indication that the virus scanner is involved. Here at work I have for example an anti-virus program called "Sophos" and its VERY slow with this when you read things the first time. This happens because the settings say that it should  scan all read files for viruses and thats not really fast ...

and @archmage: I see no lag in your video, for me this looks amazingly fast!  :P  I know there is a small lag because loading the faction images takes some time.
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: GunChleoc on 3 September 2013, 10:12:40
I just tried it out. Loading the custom games screen took pretty long. Switching techtrees after that went at lightning speed.

I only have the default techtrees installed.

System: Win7 with Avira virus scanner & Outpost firewall

MG version: 3.8.0 beta 1
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: -Archmage- on 3 September 2013, 12:13:06
Quote
Quote from: Ishmaru on September 02, 2013, 23:12:23
I just want to note, the lag seems to be a one time issue (at least till i shut down my computer/restart).

This is a very strong indication that the virus scanner is involved. Here at work I have for example an anti-virus program called "Sophos" and its VERY slow with this when you read things the first time. This happens because the settings say that it should  scan all read files for viruses and thats not really fast ...

Ishmaru check antivirus settings, you can usually tell the antivirus where not to scan.

Quote
and @archmage: I see no lag in your video, for me this looks amazingly fast!  :P  I know there is a small lag because loading the faction images takes some time.
That's because it's on an SSD, with no antivirus running. There's probably not anything faster running MG and there is still lag. :look:
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: tomreyn on 3 September 2013, 19:57:59
Archmage: The video you uploaded doesn't show any lag switching techtrees. Are you saying you are still having lag switching techtrees but the video does not show it?
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: -Archmage- on 3 September 2013, 21:23:04
Archmage: The video you uploaded doesn't show any lag switching techtrees. Are you saying you are still having lag switching techtrees but the video does not show it?
I was kinda showing overall laggyness of it on a fast system. When I switch techtrees at first it's a bit laggy then it stops. I thought that was what ishmaru was experiencing, only a lot worse. I'll put it on an HDD and test it again. For now it looks like it's just anti-virus.

Why does loading stuff slow down the video rendering?
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: titi on 11 September 2013, 09:40:28
because its not done asynchron :D . Asynchronous loading was too difficult and not worth the effort in my opinion.
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: softcoder on 18 September 2013, 00:01:24
I think its the fact that we read the techtree lng file. For some reason thius seems slower on windows and I do not know why yet. Its either the scanner (glob) logic or the actual file I/O of VC++ vs GCC (or the OS response time). At some point I'll time it and find out how to fix this. Focus right now is stabilizing the out of synch issue.
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: softcoder on 29 October 2013, 22:39:48
Is this still slow? For me I don't notice a slowdown when i switch.
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: Ishmaru on 1 November 2013, 21:25:22
I still do, however it seems a bit better than when I first reported. I last tested this on Annex using rev 4645.
Title: Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
Post by: titi on 3 November 2013, 11:47:37
Maybe you get mixed up with the fact that the faction picture is loaded delayed and asynchronous ?
The faction switch itself should be fast.