widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #14153
[Merge] lp:~widelands-dev/widelands/bug-1786613-10s-return-skipped into lp:widelands
Toni Förster has proposed merging lp:~widelands-dev/widelands/bug-1786613-10s-return-skipped into lp:widelands.
Commit message:
reduce waiting time to 10ms for skipped programs
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1786613 in widelands: "production times are 10s longer when return=skipped"
https://bugs.launchpad.net/widelands/+bug/1786613
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1786613-10s-return-skipped/+merge/352967
That "penalty" is reduced to 10ms. Which means there is no measurable effect. After 1000 produced wares it would be 10 seconds. For a ware that would be produced constantly every 60 seconds it would take 16.6 in-game hours to result in a loss of 1 product due to the time penalty. Currently this happens very 6 minutes.
I couldn't see any slowdowns or higher CPU usage. My test scenario:
The Nil map, 8 AIs, 2 Teams with all 4 tribes assigned to each team.
My System:
MacBook 7,1
Intel Core2Duo@2.4GHz
16GB Ram
macOS 10.13.6
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1786613-10s-return-skipped into lp:widelands.
=== modified file 'src/logic/map_objects/tribes/productionsite.cc'
--- src/logic/map_objects/tribes/productionsite.cc 2018-06-19 08:52:49 +0000
+++ src/logic/map_objects/tribes/productionsite.cc 2018-08-13 09:53:54 +0000
@@ -899,7 +899,7 @@
SkippedPrograms::const_iterator i = skipped_programs_.find(program_name);
if (i != skipped_programs_.end()) {
uint32_t const gametime = game.get_gametime();
- uint32_t const earliest_allowed_start_time = i->second + 10000;
+ uint32_t const earliest_allowed_start_time = i->second + 10;
if (gametime + tdelta < earliest_allowed_start_time)
tdelta = earliest_allowed_start_time - gametime;
}
Follow ups