Switching between engine versions causes long startup times

Switching between engine versions causes long startup times

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Switching between engine versions causes long startup times

Post by knorke »

Beside current 91.0 I also have kept 88.0, 89.0 and 90.0 so I can watch replays of my best victories again and again. (all portable mode, sharing one springcontentdir)
Problem is the first time version XY is started, it takes around two minutes to load. After that it will load instantly.
for example:
1) start 88.0 after last playing 91.0 - long load
2) start 88.0 again - instantly loaded
3) start 91.0 - long load
4) start 91.0 again - instantly loaded

Anyone else noticed the same?
When it takes long to load the HDD is also being accessed a lot.
So maybe spring is scanning the mods and maps and making checksums and filelists or something? And they have to be remade for each version?
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Switching between engine versions causes long startup ti

Post by gajop »

suggest you do what ZK has been doing:
make maps/mods/games shared through engines and have cache in engine specific dirs
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Switching between engine versions causes long startup ti

Post by Beherith »

Its because you have tons of .sdd folders in your main mods/maps folders. Those really impact first load times (takes more than 5 minutes for me)
.sdd should really be a temporary thing, but its just too comfortable to keep svn's of mods there.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Switching between engine versions causes long startup ti

Post by abma »

can you please check in ArchiveCache.lua if:

internalver = 9,

changes when you switch the engine?

if so, problem is clear: spring regenerates the cache if version isn't identical...
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Switching between engine versions causes long startup ti

Post by knorke »

It says internalver = 9, for both 91.0 and 88.0
Though even in spring-88.0\cache\ArchiveCache.lua it says 9?

But yes, it rewrites ArchiveCache.lua on engine switch:
Different file size.
Each engine folder also has a pool\ folder, from rapid I guess, could that be the problem? That the pool folders have different stuff in them?
make maps/mods/games shared through engines and have cache in engine specific dirs
How to set that? Actually I noticed on top of the cache folder in springdatadir each engine also has a cache folder in its directory.
Is engine switching instant for you?

.sdd:
Hm, I will see if moving them to mods\ and moving real games to games\ works.
Then for playing I could rename mods\ folder to disable it..
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Switching between engine versions causes long startup ti

Post by gajop »

knorke wrote:
make maps/mods/games shared through engines and have cache in engine specific dirs
How to set that? Actually I noticed on top of the cache folder in springdatadir each engine also has a cache folder in its directory.
Is engine switching instant for you?
No idea how to set it up, I just use the ZK setup on windows.
I think it's instant (although I can't check now as I'm on linux).
Each engine still has to write to the cache once, but after that it shouldn't need to redo it.
Although for some reason there's a cache directory in the top level dir (shared dir) as well as the engine specific ones, so I suggest you actually try it for yourself and see how it works.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Switching between engine versions causes long startup ti

Post by abma »

@knorke:

in your case it seems spring shares one ArchiveCache.lua for multiple engines. spring seems for some reason to recreate the cache when you switch the engine.

to solve: make spring think its in portable mode... afaik add a springsettings.cfg next to spring.exe / look into infolog.txt to see whats happening. if it recaches stuff, there are entries like "new map found..."
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Switching between engine versions causes long startup ti

Post by knorke »

all the spring.exe's have a springsettings.cfg next to them.
I have attached some infologs.
Warning: Failed to scan C:\Spiele\spring_88.0_portable\spring-88.0\maps\ramptest.sdd (missing modinfo.lua/mapinfo.lua)
Scanning: C:\Spiele\spring_88.0_portable\spring-88.0\base
Scanning: C:\Spiele\spring_88.0_portable\spring-88.0\games
Warning: Failed to scan C:\Spiele\spring_88.0_portable\spring-88.0\games\Brickcraft.sdd (missing modinfo.lua/mapinfo.lua)
Error: Error opening C:\Spiele\spring_88.0_portable\spring-88.0\games\journeywar.sdz
Unable to open archive: C:\Spiele\spring_88.0_portable\spring-88.0\games\journeywar.sdz
I have removed those files but did not make a difference in speed.
(and the messages show too when it is loading fast on second start)

In C:\Users\dell\Documents\My Games\Spring there are just empty folders..(maps, mods, packages, pool, repos)
maybe from testing alphalobby since there is also an
alphalobby.conf
deleting that also made no difference.
gajop wrote:No idea how to set it up, I just use the ZK setup on windows.
hm, I want to avoid installing zkl just for test because last time I was always redownloading stuff I already have to places I did not know. :shock:
Attachments
infolog_91_slow.txt
(3.82 KiB) Downloaded 18 times
infolog_91_fast.txt
(3.82 KiB) Downloaded 18 times
infolog_88_slow.txt
(4.06 KiB) Downloaded 18 times
infolog_88_fast.txt
(3.82 KiB) Downloaded 15 times
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Switching between engine versions causes long startup ti

Post by jK »

add the following to your spring config

Code: Select all

LogSections = ArchiveScanner
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Switching between engine versions causes long startup ti

Post by knorke »

dumdidum
Attachments
infolog_91_fast_log.txt
(3.76 KiB) Downloaded 19 times
infolog_91_slow_log.txt
(4.62 KiB) Downloaded 21 times
infolog_88_slow.txt
(4.06 KiB) Downloaded 23 times
infolog_88_fast_log.txt
(4.13 KiB) Downloaded 16 times
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Switching between engine versions causes long startup ti

Post by Forboding Angel »

I run in isolated mode and portable on various engine versions and I can confirm that this happens. I've reported it, but no one seems to care.

Oh also, different issue, but still related, hang detection still causes hangs even if it is turned off.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Switching between engine versions causes long startup ti

Post by abma »

@knorke:
88.0 & 91.0 is using the same read-write directory:
Using read-write data directory: C:\Spiele\springcontent\

if you can change that, your problem should be solved...

you can hack-arround this by creating an folder named

Code: Select all

C:\Spiele\springcontent\ __$testfile42$.test
see https://github.com/spring/spring/blob/d ... n.cpp#L360

@Forboding Angel :

infolog.txt please
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Switching between engine versions causes long startup ti

Post by knorke »

88.0 & 91.0 is using the same read-write directory:
Using read-write data directory: C:\Spiele\springcontent\
yes, atm there is
Using read-write data directory: C:\Spiele\springcontent\
Using read-only data directory: C:\Spiele\spring-91.0\

it should be switched around, but how?
you can hack-arround this by creating an folder named
folder or file? I tried both but no difference on startup time. Only thing I noticed is if if there was a file __$testfile42$.test it was gone after start.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Switching between engine versions causes long startup ti

Post by jK »

you shouldn't put any maps/games into `C:\Spiele\spring-xx.y\` just use a single dir where to put everything, or use 2 portable spring installs.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Switching between engine versions causes long startup ti

Post by abma »

as i wrote... a folder
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Switching between engine versions causes long startup ti

Post by knorke »

you shouldn't put any maps/games into `C:\Spiele\spring-xx.y\` just use a single dir where to put everything
i never intentionaly downloaded to there, guess it is some lobbies/downloader.
(I have since moved over the files into same folder)

I now combine the pool & packages folders into one to see if that makes a difference..takes a bit time to copy because so many small files.

@abma, was wondering because it says "string testfile"
how do i know it worked?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Switching between engine versions causes long startup ti

Post by knorke »

you shouldn't put any maps/games into `C:\Spiele\spring-xx.y\` just use a single dir where to put everything
i never intentionaly downloaded to there, guess it is some lobbies/downloader.
(I have since moved over the files into same folder)

I now combine the pool & packages folders into one to see if that makes a difference..takes a bit time to copy because so many small files.

@abma, was wondering because it says "string testfile"
how do i know it worked?

/edit
guess jk was right with "put everything in one folder", combining the pool&packages files from rapid did the trick.
both versions start instantly now.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Switching between engine versions causes long startup ti

Post by FLOZi »

How do I set my springs to use one folder?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Switching between engine versions causes long startup ti

Post by abma »

knorke wrote: @abma, was wondering because it says "string testfile"
how do i know it worked?
infolog.txt... the line "Using read-write data directory: "...
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Switching between engine versions causes long startup ti

Post by knorke »

ah! did not notice it puts infolog in spring-91.0\ too now, not in springcontent\
yes, now says:
Using read-only data directory: C:\Spiele\springcontent\
Using read-write data directory: C:\Spiele\spring-91.0\
Post Reply

Return to “Help & Bugs”