On Wed, Apr 02, 2008 at 02:03:45AM -0700, Josh Triplett wrote:

Hi Josh,

Thanks for your report.

> Many popular Wesnoth scenarios, such as SurvivalXtreme, offer the
> ability to upgrade a unit by spending gold at a shop.  In these
> scenarios, battles may regularly occur between units that have
> thousands of HP, high resistance, high defense, and berserk weapons.
> This causes the CTK/CTBK calculation to take an excessively long time,
> sometimes up to several minutes in extreme cases; during this time,
> Wesnoth does not respond to user input and does not redraw its window.
> Furthermore, when clicking the "details" button, Wesnoth again takes
> an exceedingly long time, suggesting that it recalculates the data
> rather than saving it.

The game uses a probability matrix to calculate the probabilities the
size of this matrix depends on the number of hitpoints the units have.
When there are units with a huge amount of hitpoints this matrix will
require a lot of memory, which might be quite slow due to swapping. Also
the amount of calculations can cause a delay (berserk has to calculate a
maximum of thirty rounds of combat).

The current way works properly for the mainline content. Addons with
extreme number of hitpoints (>1000) might get into problems. We had
reports of people running out of memory due to huge amount of hitpoints
due to size of the matrix and the amount of memory that required.
An idea to limit the number of hitpoints to 1000 wasn't well received
even after explaining the out of memory problem [1].

> Ideally, Wesnoth's CTK/CTBK calculator should not take this long to
> return results.  In any case, it should not completely block the user
> interface while running, should not recalculate the same data when
> providing further details, and should give some kind of progress
> indicator while running.

Since the current way works properly for mainline content and the
problem has been brought to the attention of addon developers we won't
fix this problem in the foreseeable future.

[1] http://forum.wesnoth.org/viewtopic.php?f=8&t=15761

Regards,
Mark de Wever 
(Wesnoth developer)

The current way works properly for the intended scope; units with not
more than 100 hitpoints. Outside this scope it will get worse, but
mainline has almost no units with more than 100 hitpoints.a



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to