The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: z9999+ on October 29, 2012, 07:42:09 AM

Title: [112.0] Language text files of scenario are loaded repeatedly
Post by: z9999+ on October 29, 2012, 07:42:09 AM
I'm not sure this is intended or not.

pak128/scenario/new_york/scenario.nut

function get_info_text(pl)
{
return ttextfile("info.txt")
}

function get_rule_text(pl)
{
return ttextfile("rule.txt")
}

function get_goal_text(pl)
{
return ttextfile("goal.txt")


This code means, three text files are loaded repeatedly while scenario info window is open.
I confirmed this behavior with ProcessActivityView (http://www.nirsoft.net/utils/process_activity_view.html) and Process Monitor (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx).
Reloading these text files needed only when player changed their language, isn't is ?

Title: Re: [112.0] Language text files of scenario are loaded repeatedly
Post by: Dwachs on November 04, 2012, 07:23:39 PM
Thanks for the report. Sorry for the late reply.

This is just the way it is implemented. Sure, the content of the file should be cached.
Title: Re: [112.0] Language text files of scenario are loaded repeatedly
Post by: Dwachs on February 27, 2013, 06:55:11 PM
The contents of these files are cached since some time. They will be reloaded when restarting or save & load the scenario savegame.