Lobby client startup time growing by mod count

Lobby client startup time growing by mod count

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Lobby client startup time growing by mod count

Post by TradeMark »

I found out that what more you have mods, that longer it takes to start the lobby client.

I think we need some sort of caching? Or simply remove the mod loader from startup? (if there is?)

Somehow it needs to get faster loading time...

I just removed almost all mods, 3 mods i saved, and now it doesnt load it 15 seconds anymore.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

I have 81 mod files in my mods folder and it doesn't take me any time at all to start tasclient.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

Hmm... i had some folders too, does the client scan sub directories too?
BoredJoe
Posts: 139
Joined: 03 Mar 2006, 01:37

Post by BoredJoe »

i had problems with my lobby when i had several hundred path calculations in my lobby folder- the lobby would freeze randomly sometimes, sometimes i wouldn't be able to talk in the game rooms and sometimes i could change the start boxes for just myself without being the host (in effect being able to start anywhere on the map, but everyone else stayed in the original boxes).
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

I tested it again now, and seems like it tries to scan all sub directories too.

Ive unzipped 5 mods in the mods folder, and now spring loads really long time.
I removed those folders, and now it doesnt load so long anymore...

Can someone fix it, if it is a bug...?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmm, a while back I noticed when the host started the game my spring would take longer than usual, a full 10 seconds before it actually started loading, thus killing the game for me. Fixed by removing unnecessary files and things like screenshots and now it loads almost instantaneously.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

The parser prolly scans everything.


Regexes ftw! If the suffic doesnt match up with something the lobby cares about at that time, then it shouldnt be scanned...
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

Ya, it shouldnt scan every folders inside the mod directory. (only the folders with .sdd in the end).

And you dont need regexps for that...

I still wonder why it takes so damn long time anyways...
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

It's normal it takes a long time the first time you start it because it needs to open & CRC all archives.

(first time = first time after deleting archivecache.txt)
User avatar
hrmph
Posts: 1054
Joined: 12 May 2005, 20:08

Post by hrmph »

I've had tons of mods/maps/paths and have not experienced much lag in TASclient (I do occasionally get logged out if my processor is really really busy for a bit). One problem I have noticed though is that I was experiencing the countdown clock very often when connecting to games. (Countdown comes up and game never starts). So I investigated my paths folder which had ballooned up to 2000 paths!!!! After deleting them the problem has disappeared. (I'll update this post if it comes back). So I think scanning through all those paths at the beginning of the game was slowing my computer down so much it couldn't connect to the host in time (Just a theory of course).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

This isnt the lobby, this is the UnitSync library.

Unitsync should only check the files that are relevant, but there should be the option to check everything for the initial cache.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

That's what it does now, except for the option, which would just be silly IMHO, because then you get people asking, "omg why doesn't map XXX show up?" "you need to go to options & click recreate cache".

On second & later start, the only thing it does is statting all files recursively in base/, mods/ and maps/ to see if any one of them has been modified / added.

Maybe I can turn off the recursively part for the next version: the in-game start menu doesn't support maps/mods in subdirectories anyway and it could speed it up a little, esp. in relation to many paths.
Post Reply

Return to “Engine”