Latest Posts

Topic: Game suddenly very slow

kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-04-25, 20:03

Your savegame works fine on my old 1core Intel Celeron 900 laptop, running shipping-tweaks-b21. However this was a release build.

Just try a release build. Debug builds tends to get slow, especially on big maps. Just my observation....

As long release builds don't get slow, this isn't a real problem i think.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1928
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-04-25, 20:08

The first one is in AI code (Beifang), the others are all in routing code. So this is not a bug, just the usual issue that ware/worker pathfinding can take pretty long on big maps. As kaputtnik said the only remedy against this is to use release builds where this is not as much of a problem.


Top Quote
PkK

Topic Opener
Joined: 2012-01-06, 12:19
Posts: 236
Ranking
Widelands-Forum-Junkie
Posted at: 2020-04-25, 20:34

kaputtnik wrote:

Your savegame works fine on my old 1core Intel Celeron 900 laptop, running shipping-tweaks-b21. However this was a release build.

Just try a release build. Debug builds tends to get slow, especially on big maps. Just my observation....

As long release builds don't get slow, this isn't a real problem i think.

It then still is a real problem for debugging other issues on large maps.

And it appeared surprisingly quickly (the game went from well-playable to unplayable-slow instantly) rather than gradually, so I suspected some real issue here.


Top Quote
niektory
Avatar
Joined: 2019-06-03, 20:06
Posts: 206
Ranking
Widelands-Forum-Junkie
Location: Poland
Posted at: 2020-04-25, 20:38

The RelWithDebInfo (release with debug info) configuration is often a good compromise.


Top Quote
PkK

Topic Opener
Joined: 2012-01-06, 12:19
Posts: 236
Ranking
Widelands-Forum-Junkie
Posted at: 2020-04-26, 20:58

kaputtnik wrote:

Your savegame works fine on my old 1core Intel Celeron 900 laptop, running shipping-tweaks-b21. However this was a release build.

Just try a release build. Debug builds tends to get slow, especially on big maps. Just my observation....

As long release builds don't get slow, this isn't a real problem i think.

Indeed, a build with ./compile -r runs at good speed for me (on the same system, where the debug build got 0.3 fps).


Top Quote
dershrimp

Joined: 2012-05-11, 15:43
Posts: 47
Ranking
Pry about Widelands
Posted at: 2020-07-02, 17:42

Hi. I just ran in a similar issue playing Tasmanian Black War with a ~1 month old dev version. The CPU goes quickly to 100% and I got 0.3 fps with 1x game speed making the map unplayable after 2-3 hours game time. I noticed that widelands is running on only one core. Is that supposed to be or is something not working for me? Just checking.

System is Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz with 8 GB RAM, but RAM doesn't go to its limit.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1928
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-07-02, 17:53

Multithreading is something we have had on our wishlist for years, but nobody ever implemented it face-sad.png

Are you using a release or debug build? Debug builds are just not suited for playing larger games as they're very slow by nature.
It would also be interesting to know if your version is newer or older than 3fa1b7f (06.06.2020); if it's older, I'd be interested if you still get the problem with a newer version.
If the problem exists with a newer version and in release configuration, you could attach a savegame so we can see what exactly is eating your CPU.


Top Quote
dershrimp

Joined: 2012-05-11, 15:43
Posts: 47
Ranking
Pry about Widelands
Posted at: 2020-07-02, 18:00

It is a debug build, version 5acb402 (so it is a few days older apparently). I compiled the version with ./compile.sh -a, i.e. in debug build. How do I switch to the release build? Can I just call ./compile.sh -r or do I have to remove the game completely, first?


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1928
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-07-02, 18:09

Yes, it's enough to run ./compile.sh -r . Existing binaries will automatically be overwritten. I'd recommend updating to the latest version first though – on Tasmanian Black War you'll find the rework of the shipping algorithm that took place since pretty useful face-smile.png


Top Quote
dershrimp

Joined: 2012-05-11, 15:43
Posts: 47
Ranking
Pry about Widelands
Posted at: 2020-07-02, 18:50

Thanks. I did that, but it seems I cannot load the savegame with the new version. I get the following error message

Reading Buildingdata Data ... WidelandsMapLoader::load_map_complete() for 'Tasmanian Black War' took 370ms
GameLoader::load() took 3841ms
Fatal exception: buildingdata: building 3445: productionsite (frisians_quarry): [../widelands/src/logic/map_objects/tribes/productionsite.cc:264] frisians_quarry has no program 'mine_stone'
FATAL ERROR - game crashed. Attempting emergency save.

Top Quote