My PC is Macbook Pro 2018 in base build and version openTTD 1.8.0 is working totally fine. As soon as I open the new 1.9.0 version the CPU usage is sky high. I have all software updated. Any tips?
My PC is Macbook Pro 2018 in base build and version openTTD 1.8.0 is working totally fine. As soon as I open the new 1.9.0 version the CPU usage is sky high. I have all software updated. Any tips?
does it work though? does it drop back after some time?
What exactly is the difference in cpu usage (same savegame)?
what OS version do you use?
1.8 works fine, but 1.9 and all 1.9 pre-release versions works with freezes
Yes, it drop back after some time, but then can freeze again
If i change window size to smaller - it work better as i remember
Had no no much time experience with 1.9, because i always rolled back to 1.8 after each new 1.9
It would be really helpful, if possibly one of you could grab the source code, compile it and get a backtrace as to see where exactly it hangs. We are somewhat missing people who can do that on OSX.
ok, compiled and run last version from github with make CXXFLAGS='-std=c++11'
same freezes...
it was a new game with default preferences and map size
what i need to say - after resizing window to a smaller size mouse cursor moves ok
but when resize to full (or near) size of screen - freezes occurs again
_dp_ wrote:You can also try CityMania patchpack. It's fully compatible with regular OpenTTD and has one significant performance-related change in 1.9.0.
Expresso wrote:Perhaps this is related to sdl. Have you tried with the sdl2 pr?
OSX does not use and build with SDL - unless you force it by the appropriate command line options on compilation. Last time I checked (some years ago) the user experience with SDL on OSX was worse than with the native cocoa drivers.
./configure
checking awk... awk
detecting OS... OSX
checking build system type... x86_64-apple-darwin18.5.0
checking host system type... x86_64-apple-darwin18.5.0
checking universal build... no
checking build cc... gcc
checking host cc... gcc
checking build c++... g++
checking host c++... g++
checking strip... disabled
checking builtin depend... yes
checking makedepend... disabled
detecting cpu-type... 64 bits
detecting SSE... found
checking static... no
checking unicode... no
using debug level... no
using desync debug level... no
using link time optimization... no
checking OSX sysroot... no (use system default)
checking Allegro... OSX, skipping
checking SDL... OSX, skipping
checking COCOA... found
checking whether to enable the Quartz window subdriver... yes
checking Quickdraw window subdriver... disabled (64 bits)
checking GDI video driver... not Windows, skipping
checking dedicated... not selected
checking console application... not Windows, skipping
checking network... found
checking squirrel... found
checking translator... no
checking assert... enabled
checking zlib... found
checking liblzma... found
checking lzo2... found
checking Uniscribe text layout... not Windows, skipping
checking libxdg-basedir... not found
checking libpng... found
checking freetype2... found
checking libfontconfig... OSX, skipping
checking icu-lx... not found
checking icu-i18n... not found
checking libtimidity... not found
checking fluidsynth... not found
checking direct-music... not Windows, skipping
checking xaudio2... not Windows, skipping
checking sort... sort
suppress language errors... no
checking stripping... skipped
checking distcc... no (only used when forced)
checking ccache... no (only used when forced)
checking grfcodec... not found
checking nforenum... not found
detecting ppc970 (G5)... no
checking revision... no detection
WARNING: there is no means to determine the version.
WARNING: please use a subversion, mercurial, or git checkout of OpenTTD.
WARNING: you can only join game servers that have been compiled without
WARNING: version detection.
WARNING: there is a great chance you desync.
WARNING: USE WITH CAUTION!
checking iconv... found
checking if iconv has non-const inbuf... yes
checking whether to link to iconv... yes
personal home directory... Documents/OpenTTD
shared data directory... /Library/Application\ Support/OpenTTD
installation directory... /
icon theme directory... none
manual page directory... share/man/man6
menu item directory... none
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
using CFLAGS_BUILD... -fno-strict-aliasing -Wall -W -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-multichar -Wno-self-assign -Wno-parentheses -Wno-sign-compare -DOSX -D_FORTIFY_SOURCE=2 -O1
using CXXFLAGS_BUILD...
using LDFLAGS_BUILD... -rdynamic
using CFLAGS... -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -W -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-multichar -Wno-self-assign -Wno-parentheses -Wno-sign-compare -DOSX -D_FORTIFY_SOURCE=2 -DWITH_SSE -isystem/opt/local/include -DNO_QUICKTIME -DUNIX -DWITH_COCOA -DENABLE_COCOA_QUARTZ -DWITH_ZLIB -DWITH_LZMA -I/usr/local/Cellar/xz/5.2.4/include -DWITH_LZO -D_SQ64 -I/Users/dima/Downloads/OpenTTD-master/src/3rdparty/squirrel/include -DWITH_PNG -I/usr/local/Cellar/libpng/1.6.36/include/libpng16 -DWITH_FREETYPE -I/usr/local/opt/freetype/include/freetype2 -DWITH_ICONV -DENABLE_NETWORK -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\"Documents/OpenTTD\" -DWITH_SHARED_DIR -DSHARED_DIR=\"/Library/Application\ Support/OpenTTD\" -DGLOBAL_DATA_DIR=\"/usr/local/share/games/openttd\"
using CXXFLAGS...
using LDFLAGS... -lstdc++ -lc -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -lz -L/usr/local/Cellar/xz/5.2.4/lib -llzma -llzo2 -L/usr/local/Cellar/libpng/1.6.36/lib -lpng16 -lz -L/usr/local/opt/freetype/lib -lfreetype -liconv -rdynamic -framework Cocoa
Generating Makefile...
Generating lang/Makefile...
Generating setting/Makefile...
Generating grf/Makefile...
Generating objs/Makefile..
It's not OSX only. I just searched if someone else have problems with high CPU usage in version 1.9*. I noticed it on my Archlinux, after making and installing own package of version 1.9.1. I just continued previously saved game and CPU loads changed from 17-20% to 40-45%. After some time it picks to 80-100% (probably due to processor thermal reclocking). I lowered cargo distribution accuracy but without change. I noticed also immediate drop of animation smoothness. CPU load drops immediately when paused. IMHO there is something with drawing code.
As I already said CityMania client has PerformanceAccumulator disabled for vehicles so it's unlikely to be the cause of OSX perfermance drop. But it may help on Linux though, at least it did for me.
with 1.9.1 CityMania client on OS X still cause performance issues, even on "start" screen with menu (mouse pointer moves)
when a window with openttd app is active (focused) - mouse moves with freezes
when i switch to another window - mouse moves without any issues over openttd app until i click on it to focus
Can you try taking a screenshot of the framerate window when the game is running poorly? (Open it via the ? button on the main toolbar.)
Or if it's impossible to navigate to a new game so you can open that, then try opening the console and type the "fps" command and post a screenshot of the output.
@dimaloop: It looks like you're using a high-resolution 32bpp graphics set. Can you try with OpenGFX (or original) base graphics instead?
Very interesting, it's not any of the measured components that cause the slowness. At the timings measured you should be able to easily get 800 fps if it was uncapped. What happens if you turn on fast-forward?