Wincondition scripts reloaded too often

Bug #1205609 reported by cghislai on 2013-07-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Low
cghislai

Bug Description

When you enter the load replay window, all win condition scripts are loaded once for each replay - probably during preloading.
The scripts should only be loaded once, at the start of the game.

Related branches

summary: - Wincondition scripts reloaded for each replay in the load replay screen
+ Wincondition scripts reloaded too often
SirVer (sirver) wrote :

Why do you consider this a bug? I mean, yes it could be done more performanently, but I do not notice any delay. Lua is very fast and the delay of going to disk (for the replay itself) is already paid, so it should not matter.

Changed in widelands:
status: New → Incomplete
cghislai (charlyghislain) wrote :

It is quite slow here, a few full seconds before the list appear, while all the logs about loading scripts scroll in the background. I doubt it is my terminal slowing the whole thing down. I will profile that

Changed in widelands:
status: Incomplete → Confirmed
assignee: nobody → cghislai (charlyghislain)
milestone: none → build18-rc1
Changed in widelands:
status: Confirmed → Incomplete
milestone: build18-rc1 → none
assignee: cghislai (charlyghislain) → nobody
SirVer (sirver) wrote :

Well, I have a solid state disk, so the seeks could be the culprit. Should be easy to only load this once though: just keep a Lua Interface around - they cash the script names and/or you can cash the LuaTables returned from the win conditions.

cghislai (charlyghislain) wrote :

There is a fix for this. create the game object in wlapplication, similar to what is done for the load game dialog. The Game preload data paquet object can be created outside of the loop, too.

Changed in widelands:
assignee: nobody → cghislai (charlyghislain)
milestone: none → build18-rc1
Changed in widelands:
status: Incomplete → In Progress
Nasenbaer (nasenbaer) wrote :

As far as I understand, the fix is committed- > fix committed

Changed in widelands:
status: In Progress → Fix Committed
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers