Author Topic: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.  (Read 2122 times)

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
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.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
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.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
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?
Egypt Remastered!

Proof: Owner of glest@mail.com

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
...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.

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
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?
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
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.
Egypt Remastered!

Proof: Owner of glest@mail.com

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
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.


Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
then why does it take just as long if a tech tree doesn't have a translation?
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
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).

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
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.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
I'm running MG on an SSD and still getting lag. I'll record it.

https://www.youtube.com/watch?v=aaWu7Yr-5_E
Egypt Remastered!

Proof: Owner of glest@mail.com

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
I just want to note, the lag seems to be a one time issue (at least till i shut down my computer/restart).
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
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.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

GunChleoc

  • Horseman
  • ****
  • Posts: 202
    • View Profile
    • Fòram na Gàidhlig
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

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
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:
Egypt Remastered!

Proof: Owner of glest@mail.com

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
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?
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
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?
Egypt Remastered!

Proof: Owner of glest@mail.com

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
« Reply #17 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.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Extreme lag when switching between techtrees in 3.8.0 beta 1 and above.
« Reply #18 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.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Is this still slow? For me I don't notice a slowdown when i switch.

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
I still do, however it seems a bit better than when I first reported. I last tested this on Annex using rev 4645.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Maybe you get mixed up with the fact that the faction picture is loaded delayed and asynchronous ?
The faction switch itself should be fast.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

 

anything