Bug 172926

Summary: kgoldrunner: takes excessive CPU time
Product: [Applications] kgoldrunner Reporter: Mark Purcell <msp>
Component: generalAssignee: Ian Wadham <iandw.au>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kde-games-bugs, russell
Priority: NOR    
Version: 3.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mark Purcell 2008-10-16 09:57:00 UTC
Version:           3.0 (using 4.1.2 (KDE 4.1.2), Debian packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.26-1-686

Forwarded: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493183

From: Russell Coker <russell@coker.com.au>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: kgoldrunner: takes excessive CPU time
Date: Fri, 01 Aug 2008 13:42:42 +1000

Package: kgoldrunner
Version: 4:3.5.9-2
Severity: normal

When the number of wraiths is increased the amount of CPU time taken for
the game increases dramatically.

On a P4-1.5GHz with 15 wraiths about 50% of the machine's CPU time is
used.  With 20 wraiths about 80% is used, and with 30 100% CPU time is
used and the game runs noticably slower.

Levels such as the mongolian horde run quite slowly.

Even on an Opteron 1212 (2GHz, 64bit) I've found kgoldrunner to perform
poorly on levels with moderate numbers of wraiths.
Comment 1 Ian Wadham 2008-10-26 07:02:23 UTC
Bugs in KDE applications should be reported via the menu item Help->Report Bug... which gets them to the bugs.kde.org database and direct to the author/maintainer (me, in this case).  I note you reported this on 1 Aug 2008 and I do not know how to stop my replies going to Debian ...

Re this report, I am rather surprised and intrigued by it.  Until a year ago, I was doing all my development on a P4 - 2.4 GHz with 256 Mb of RAM, including development of the KDE 4.0 version of KGoldrunner.

We had some trouble with graphics performance of KGoldrunner (and some other games), using Qt 4 graphics classes, over two years ago now, but switched to a faster lighter-weight graphics library, which we are still using.

I tried running the Mongolian Hordes level (Initiation, level 25) on my laptop, a Core Duo T2450 (32-bit) at 2GHz with 2Gb of RAM, but averaged about 5% CPU usage (in the "top" command) - more than expected but not 80+%.

Russell, since we live in the same city and belong to the same LUG, perhaps we could get together and track down what might be causing this performance problem.  You can find me in the white pages phone book.

My first theory is that it is something in the KDE 4 libraries or desktop.  I do not have a KDE 4 desktop (with Plasma), do you?  I am developing using KDE 3.5 with Qt 4 libraries and KDE 4 versions of KDE libs and KDE Games libs.
Comment 2 Andrew Crouthamel 2018-11-02 04:21:11 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Ian Wadham 2018-11-02 05:42:02 UTC
I think it is quite OK to close the bug now, but as you can read in Comment 1 (by me) I tried to get in touch with the original submitter, Russell Coker who reported via Debian. However I think his email address had some sort of ultra-security filter around it.

Anyway, since 2008, KGoldrunner has gone through several upgrades of its animation, its timer-event processing and the graphics library it has used from time to time. I also put in my own timer class which detects when the Qt event processor has become transiently overloaded and has missed timer events. KGoldrunner then catches up on the missed events.

Also, machines are much faster nowadays than they were in 2008. I never see missed timer-events in KGoldrunner on my 2017 MacBook Pro, with 2.3 GHz Intel Core i5 processor and 8Gb of RAM.