SLOW Performance Issues: post here to report

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
Hemerodromus
Posts: 1
Joined: August 27th, 2010, 12:24 am

Re: SLOW Performance Issues: post here to report

Post by Hemerodromus »

I am having the same problem on my macbook pro. The slowdown only occurs when I have the main menu up, and I can open and play a game, if I act before the slowdown basically freezes up the program.

My specs are as follows:
It is a Macbook Pro 13" made in 2010 with an Intel Core 2 Duo, 2.4Ghz and 4GB of RAM. It uses an NVidia GeForce 320M 256MB video card. I am running Wesnoth 1.10.6 on OS X 10.9.
Arcus
Posts: 2
Joined: April 25th, 2014, 1:50 pm

Re: SLOW Performance Issues: post here to report

Post by Arcus »

Hi,

i love playing on large maps, now i've compiled Wesnoth 1.11.13 and just began to create a new Map, sized 141x100. The editor version in 1.10.7 was able to handle such a large map, editing anything with a little delay (perhaps 1/10 second). The editor in version 1.11.13 needs 2-3 seconds on my system, to make any changes on the map. The screen freezes completely in this time. It doesn't matter wether i change 1, 13, 112 or X fields on the map. It takes everytime the same delay.

This occurs with every map on this size.

And the problem goes on: I just tested such a large map to see if there are problems by playing these. If a unit moves, the fps breaks. The unit doesn't slide it's way to the new location. The game skips frames like hell and i'm ending up with 1 frame per second.

I've compiled version 1.11.13 on my openSuSe system (version 13.1, linux-kernel 3.12.1)
Few things about my system: Intel(R) Core(TM) i5-4200U, 8GB Ram, NVIDIA Geforce GT 730M
User avatar
Coffee
Inactive Developer
Posts: 180
Joined: October 12th, 2010, 8:24 pm

Re: SLOW Performance Issues: post here to report

Post by Coffee »

Arcus wrote:I just tested such a large map to see if there are problems by playing these. If a unit moves, the fps breaks. The unit doesn't slide it's way to the new location. The game skips frames like hell and i'm ending up with 1 frame per second.
For 1.11.13 there has been a change to the way animations are drawn when the CPU/disk is stressed. The skipping animations should actually occur because the alternative is jerky motion. Does this happen with fog of war and shroud turned off? I just tested on a 200x200 user map and it works smooth with fog and shroud off and low fps as you say here with fog on (which is probably due to the new fog clearing as the unit goes mechanism and the massive map).
CIB
Code Contributor
Posts: 625
Joined: November 24th, 2006, 11:26 pm

Re: SLOW Performance Issues: post here to report

Post by CIB »

Make sure to compile with -O3 btw, it makes a huge difference for fast fog clearing.
Arcus
Posts: 2
Joined: April 25th, 2014, 1:50 pm

Re: SLOW Performance Issues: post here to report

Post by Arcus »

ok now,

ive recompiled wesnoth, -O3 wasnt flagged for everything, ive changed that. it took long, but it had an effect. the game is a little bit faster.

the fps drops anyway. its not 1 frame per second anymore, but below 10 fps. without fog and shroud, everything works fine...
I also tried with disabled animations and effects, but that had no effect.

i dont want to play without fog and shroud, so i hope until version 1.12.0 this can be speeded up to work fine with large maps, too.

anyway, if someone has any further ideas, i could need them^^
thanks :)
gfgtdf
Developer
Posts: 1431
Joined: February 10th, 2013, 2:25 pm

Re: SLOW Performance Issues: post here to report

Post by gfgtdf »

Arcus wrote:ok now,

ive recompiled wesnoth, -O3 wasnt flagged for everything, ive changed that. it took long, but it had an effect. the game is a little bit faster.

the fps drops anyway. its not 1 frame per second anymore, but below 10 fps. without fog and shroud, everything works fine...
I also tried with disabled animations and effects, but that had no effect.

i dont want to play without fog and shroud, so i hope until version 1.12.0 this can be speeded up to work fine with large maps, too.

anyway, if someone has any further ideas, i could need them^^
thanks :)
i recently had problems with slow calculation of minimap of large maps (the minimap is recalculated after every step of the move.). If replacing "scale_surface_sharp" with "scale_surface" in https://github.com/wesnoth/wesnoth/blob ... p.cpp#L265 (src/minimap.cpp line 265) helps for you that could be a casue.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Scampada
Posts: 24
Joined: March 15th, 2011, 12:05 am
Location: Balkans

Re: SLOW Performance Issues: post here to report

Post by Scampada »

What did they do to Wesnoth? I've been playing it for years on old Ubuntu, Mint, Debian etc. Now I've got openSUSE 13.1 KDE and decided to compile Wesnoth 1.11.15. Well, I'm there. But it's lagging lik'n old crap on Windows 98.
The first is, when I select fast (2x speed) animation, they've become... ahem... looks like it's giving one frame out of ten needed.
Then, the second is about the fog. They said enough of this - it's lagging.

So, I do not understand, what wrong is with Wesnoth, why, and what did I get theverydamnnewest version to get all those bugs for? Can I play MP with e.g. 1.10? It was fast and furious...
And there are some oddities in that new interface.

Please, revert those wrong changes making Wesnoth ill and release a patch or something... wanna play my favourite game... thanks in advance

Ah, yes. Packard Bell dot s 1.66 x64, 2 cores, 2Gb RAM, openSUSE 13.1 KDE4, home and / are both ext4, game compiled with cmake... CPU usage 50-75% even while minimized, memory usage about 8-10%... All previous Wesnoths ran great...
liminal unit
User avatar
Scampada
Posts: 24
Joined: March 15th, 2011, 12:05 am
Location: Balkans

Re: SLOW Performance Issues: post here to report

Post by Scampada »

Make sure to compile with -O3 btw, it makes a huge difference for fast fog clearing.
Excuse me, what is -O3? What does that flag mean and where should I put it? I googled it and found nothing.
I don't want to recompile AGAIN (the fourth time), but if that may make the game faster... I have nothing else left...
liminal unit
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: SLOW Performance Issues: post here to report

Post by iceiceice »

-O3 is the level of optimizations used by the compiler. 3 is the highest level. O2 is what we use by default I think.

I don't use CMake, but if you were using scons I think the way you do it is something like scons extra_flags_release="-O3".

You can tell what you have by looking at the compilation log. For instance you can see that I'm using -O2:
Spoiler:
Scampada wrote: I don't want to recompile AGAIN (the fourth time), but if that may make the game faster... I have nothing else left...
Try enabling your build tool to use multiple cores. In scons, that would be done with scons --jobs 2 (you said you have two cores?)
Also I would recommend to use clang instead of gcc, it is about twice as fast for the wesnoth project. You should be able to compile in 20 minutes give or take.
User avatar
Iris
Site Administrator
Posts: 6796
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: SLOW Performance Issues: post here to report

Post by Iris »

Note that if you were building with cmake + gcc and didn’t specify a value for the CMAKE_BUILD_TYPE option, you will get a build that has no optimizations enabled at all, which is bound to result in very poor performance and large executable sizes. If you want to enable optimizations, set CMAKE_BUILD_TYPE to Release (e.g. cmake -DCMAKE_BUILD_TYPE=Release ..), which will use -O3.

As for speeding up builds, the -j<N> switch (e.g. -j2, equivalent to the --jobs 2 example from iceiceice above) can be passed to either make or scons (depending on whether you are building with cmake or scons) to build that number of files in parallel, taking advantage of your CPU power at the cost of higher RAM usage.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
beetlenaut
Developer
Posts: 2813
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: SLOW Performance Issues: post here to report

Post by beetlenaut »

shadowm wrote:If you want to enable optimizations, set CMAKE_BUILD_TYPE to Release (e.g. cmake -DCMAKE_BUILD_TYPE=Release ..), which will use -O3.
I had no idea the default was so bad. That dropped my executable size from 49M to 21M, and everything loads two or three times as fast! :shock:
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
bmartin
Posts: 2
Joined: March 4th, 2015, 2:49 am

Re: SLOW Performance Issues: post here to report

Post by bmartin »

Ubuntu 14.04, Wesnoth 1.12.0 from the repository. English version.

I just installed this OS on my computer. It's using all the standard libraries w/ the newest updates from the repositories.

Steps to reproduce:
  1. Start Heir to the Throne.
Instant 200-350% CPU usage (quad core). I tried disabling animations but that didn't help.

This is on a Core i7 CPU (quad core, 2.8 GHz) with 8 GB RAM and an NVIDIA GeForce GT 630M GPU. It tears it up with most games.
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: SLOW Performance Issues: post here to report

Post by iceiceice »

Ok just to be clear, exactly how did you install the game? To the best of my knowledge wesnoth 1.12 is not currently in the standard Trusty Tahr repository.

Afaik the ways you can install on Ubuntu are:
User avatar
beetlenaut
Developer
Posts: 2813
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: SLOW Performance Issues: post here to report

Post by beetlenaut »

bmartin wrote:Instant 200-350% CPU usage (quad core).
This definitely shouldn't happen, but I had a similar issue recently that went away without anyone actually trying to fix it as far as I know. Maybe your problem is related: What resolution are you using? Try running BfW in a small window (600x400 or so) and see if it still happens.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
bmartin
Posts: 2
Joined: March 4th, 2015, 2:49 am

Re: SLOW Performance Issues: post here to report

Post by bmartin »

I tried wesnoth --resolution 640x480; it set the res. to 800x480x32. The problem persists.

Code: Select all

blake ~ $ apt-cache search wesnoth-1.12 | grep "1.12 -"
wesnoth-1.12 - fantasy turn-based strategy game - complete suite (branch 1.12)

blake ~ $ cat /etc/issue
Ubuntu 14.04.2 LTS \n \l

blake ~ $ apt-cache policy wesnoth-1.12
wesnoth-1.12:
  Installed: 1:1.12.0-1~ubuntu14.04.1
  Candidate: 1:1.12.0-1~ubuntu14.04.1
  Version table:
 *** 1:1.12.0-1~ubuntu14.04.1 0
        100 http://us.archive.ubuntu.com/ubuntu/ trusty-backports/universe amd64 Packages
        100 /var/lib/dpkg/status
Apparently it's from backports. Backports was enabled by default; I didn't enable it.

I tried 1.10.7; same problem. I'm guessing this is an SDL or pulseaudio thing. What can I do to test those theories?
Post Reply