Anonymous | Login | Signup for a new account | 2024-11-22 03:35 PST |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
0010052 | Dwarf Fortress | Technical -- General | public | 2016-10-26 13:08 | 2018-02-23 15:52 | ||||||
Reporter | alexchandel | ||||||||||
Assigned To | lethosor | ||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||
Status | acknowledged | Resolution | open | ||||||||
Platform | OS | OS X | OS Version | 10.12.0 | |||||||
Product Version | 0.43.05 | ||||||||||
Target Version | Fixed in Version | ||||||||||
Summary | 0010052: DF uses 57% in PRINT_MODE:2D with 640x300 window, over 100% when maximized | ||||||||||
Description | Running the current version of dwarf-fortress on the current version of macOS/OSX with the default settings results in a steady 57% usage. Maximizing the window results in over 100% usage. This persists even when a world is loaded & paused, and even with sound disabled. Based on the description of 2D print mode, there's no reason this abhorrent CPU usage should exist. This is severe because without 2D print mode on OSX, the crash from 0009762 occurs. It's possible both issues are related, and emanate from the ancient version of SDL that DF uses. | ||||||||||
Steps To Reproduce | 1. Start DF 0.43.05 on macOS 10.12.0 2. Observe 57% CPU usage on the menu and in-game. | ||||||||||
Tags | No tags attached. | ||||||||||
Attached Files | |||||||||||
Relationships | |||||||||||
|
Notes | |
(0036003) alexchandel (reporter) 2016-10-26 13:40 |
Note that 2D is the only mode that uses 57-100% CPU, and changing to SINGLE_BUFFER:YES makes no difference. |
(0036062) lethosor (manager) 2016-11-24 22:52 |
Are you using the 64-bit build (which comes with SDL 1.2.15) or the 32-bit build (SDL 1.2.13, last I checked)? This is almost certainly an SDL 1.2 issue Toady can't fix, in any case. |
(0036465) alexchandel (reporter) 2017-04-25 15:00 |
The 64-bit build, version 0.43.05 for OS X, which comes with SDL 1.2.14 according to its Info.plist, but SDL 1.2.15 according to its SDL_version.h. This can't be a wholly SDL issue, as there are plenty of SDL 1.2.x games that don't use 100% CPU when maximized. |
(0036466) alexchandel (reporter) 2017-04-25 15:19 edited on: 2017-05-12 10:05 |
I switched to PRINT_MODE:TEXT for now, which works fantastic. (when using "bright colors for bold text" per 0010054. I didn't realize DF used ANSI 8-colors with bold rather than 256-colors in text mode.) Has Toady ever attempted updating to SDL 2? I know the video functions have changed somewhat, but given that so much of DF code is mechanics and so little video, shouldn't the upgrade be relatively manageable? As long as PRINT_MODE:TEXT still exists afterwards. |
(0036477) lethosor (manager) 2017-04-29 11:50 edited on: 2017-04-29 11:50 |
The fact that this doesn't occur on OS X 10.11 implies to me that it's a compatibility issue with SDL 1.2 and macOS 10.12. SDL 1.2 is ancient, so I wouldn't expect it to work well on on newer macOS versions. Does PRINT_MODE:STANDARD work? That's typically been better in terms of performance for me. Also, the SDL version in SDL_version.h (1.2.15) is the right one. |
(0036526) alexchandel (reporter) 2017-05-12 10:04 edited on: 2017-05-12 10:05 |
PRINT_MODE:STANDARD and other OpenGL modes do work. It would be nice if 2D modes worked though, since OpenGL modes don't support truetype fonts. Interestingly the new SDL build from 0009762 doesn't fix this issue. Is there an open bug for updating to SDL 2? |
(0036535) lethosor (manager) 2017-05-17 14:07 |
There is not, but not using SDL 2 is not a bug by itself, so please don't report it here. Toady wasn't the person that wrote the SDL code, by the way, so it wouldn't be easy for him to update. |
(0037336) alexchandel (reporter) 2017-12-16 20:35 edited on: 2018-02-16 11:39 |
Just tested, still happens in 44.02 and macOS 10.13 (even with Mifki's SDL build). |
(0037797) alexchandel (reporter) 2018-02-16 11:39 |
Interestingly, this doesn't happen with TWBT (v0.44.05, Mifki's SDL build). |
(0037798) lethosor (manager) 2018-02-16 14:42 |
That's because TWBT is PRINT_MODE:STANDARD (TWBT in init.txt, but DF defaults that to STANDARD). |
(0037825) jecowa (reporter) 2018-02-23 15:52 edited on: 2018-02-23 15:52 |
Just did some testing of this on 2013 desktop computer with 64-bit 0.44.05 on Mac OS X 10.12 Sierra. Default Window size, 2D Print: 16.1% - 16.9% CPU usage Default Window size, STANDARD Print: 7.6% - 8.0% CPU usage Maximized Window size (not full screen), 2D Print: 27.4% - 27.9% CPU usage Maximized Window size (not full screen), STANDARD Print: 81.0% - 81.2% CPU usage And for comparison, some testing on 2008 laptop computer with 64-bit 0.44.05 on Mac OS X 10.7 Lion: Default Window size, 2D Print: 15.4% - 16.3% CPU usage Default Window size, STANDARD Print: 12.0% - 13.4% CPU usage Maximized Window size (not full screen), 2D Print: 53.2% - 61.7% CPU usage Maximized Window size (not full screen), STANDARD Print: 44.0% - 45.2% CPU usage |
Issue History | |||
Date Modified | Username | Field | Change |
2016-10-26 13:08 | alexchandel | New Issue | |
2016-10-26 13:40 | alexchandel | Note Added: 0036003 | |
2016-11-24 22:52 | lethosor | Note Added: 0036062 | |
2016-11-24 22:52 | lethosor | Assigned To | => lethosor |
2016-11-24 22:52 | lethosor | Status | new => needs feedback |
2017-04-25 15:00 | alexchandel | Note Added: 0036465 | |
2017-04-25 15:00 | alexchandel | Status | needs feedback => assigned |
2017-04-25 15:19 | alexchandel | Note Added: 0036466 | |
2017-04-29 11:50 | lethosor | Note Added: 0036477 | |
2017-04-29 11:50 | lethosor | Status | assigned => needs feedback |
2017-04-29 11:50 | lethosor | Note Edited: 0036477 | View Revisions |
2017-04-29 11:53 | lethosor | Description Updated | View Revisions |
2017-05-12 10:04 | alexchandel | Note Added: 0036526 | |
2017-05-12 10:04 | alexchandel | Status | needs feedback => assigned |
2017-05-12 10:05 | alexchandel | Note Edited: 0036526 | View Revisions |
2017-05-12 10:05 | alexchandel | Note Edited: 0036466 | View Revisions |
2017-05-12 10:05 | alexchandel | Note Edited: 0036466 | View Revisions |
2017-05-17 14:07 | lethosor | Note Added: 0036535 | |
2017-05-17 14:07 | lethosor | Status | assigned => acknowledged |
2017-12-16 20:35 | alexchandel | Note Added: 0037336 | |
2018-02-16 11:39 | alexchandel | Note Added: 0037797 | |
2018-02-16 11:39 | alexchandel | Note Edited: 0037336 | View Revisions |
2018-02-16 14:42 | lethosor | Note Added: 0037798 | |
2018-02-23 15:52 | jecowa | Note Added: 0037825 | |
2018-02-23 15:52 | jecowa | Note Edited: 0037825 | View Revisions |
2019-10-05 13:55 | lethosor | Relationship added | has duplicate 0011152 |
2021-01-28 17:06 | lethosor | Relationship added | related to 0011680 |
Copyright © 2000 - 2010 MantisBT Group |