Wincondition scripts reloaded too often

Bug #1205609 reported by cghislai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
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.

Tags: lua ui

Related branches

summary: - Wincondition scripts reloaded for each replay in the load replay screen
+ Wincondition scripts reloaded too often
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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
Revision history for this message
Nasenbaer (nasenbaer) wrote :

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

Changed in widelands:
status: In Progress → Fix Committed
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.