wesnoth-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-dev] Mainline campaigns are bad citizens


From: Guillaume Melquiond
Subject: [Wesnoth-dev] Mainline campaigns are bad citizens
Date: Sun, 15 May 2005 23:52:32 +0200

Hi,

After having rewrote the preprocessor, I take a look at why it was
taking so long to create the caches. Here are two bad behaviors I
noticed in the campaigns. I will give some examples, but don't take it
as a directed attack: *every* campaign is guilty (of at least one of
the two problems).

1) Multiple useless inclusions of the same file

Example: The_Rise_of_Wesnoth/trow-macros.cfg only contains macros, no
WML structure, and it is included from each scenario. It means this
single file will be preprocessed almost 30 times, yet one time would
have been enough.

Solution:  Including the file from the campaign main file instead of
each scenario file would have made it available to all the scenarios
by loading it only once.

2) Garbage in the scenario directory

Example: Eastern_Invasion/deaths.cfg contains some WML structures, so
it is natural it is preprocessed from each scenario. However it is in
the scenario directory, meaning that it will also be automatically
parsed due to the way the campaign main file is written. Consequently
it will pollute the config space by putting 4 useless [event]
structures at the root of it.

Solution: don't put non-scenario WML in the scenario directory, put it
in a subdirectory for example. Or don't use implicit inclusion in the
campaign file, but it may be too bothersome.

I hope it helps improving Wesnoth.
Best regards,

Guillaume




reply via email to

[Prev in Thread] Current Thread [Next in Thread]