0 registered members (),
792
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: minimize cpu usage
[Re: Wjbender]
#430936
10/06/13 11:31
10/06/13 11:31
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
OP
Expert
|
OP
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
@Uhrwerk: sorry, I didn't see you replied... I'm using an Intel i7 (4770k) with 8 threads (4 cores) running at 3.5ghz each. My graphics card is an AMD Radeon HD 7850 (in case that's important, too). this application uses ~8-10% ( 64-80% of one core or 2.24-2.8ghz):
#include <acknex.h>
void main()
{
wait(1);
fps_max = 60;
video_set(sys_metrics(0) * .5, sys_metrics(1) * .5, 0, 2);
}
POTATO-MAN saves the day! - Random
|
|
|
Re: minimize cpu usage
[Re: Aku_Aku]
#430939
10/06/13 12:17
10/06/13 12:17
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
User
|
User
Joined: Mar 2012
Posts: 927
cyberspace
|
On a note beside that note , lite-c sucks no matter what you say on its behalf it sucks they tried to get close to the real language with it which would be okay for any newcomer but it still sucks to me even the c++ of gamestudio sucks , lite-c is not exactly much of a scrypting language , it looks like a chopped down c language ..half measures .. So who is comparing here ? Me or acknex
Compulsive compiler
|
|
|
Re: minimize cpu usage
[Re: Superku]
#430941
10/06/13 14:15
10/06/13 14:15
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Wbjender is right, kindaish, I mean, Lite-C really isn't that good. Though that's pretty much all I'm agreeing on with him, and don't get me started on the Apple and Oranges comparison between Lite-C and C++.
Anyhow, the reason your CPU activity is so high, despite gamestudio not doing anything, is most likely because it is busy looping it's run loop. You see, there are cases where it makes sense to do only work in bursts and give CPU time back otherwise, not only for performance but also battery uses, but it doesn't make sense for Gamestudio.
If you limit the FPS to 60, it makes sense to only dispatch a run through the run loop every 16 milliseconds, that's what you expect after all. It doesn't make sense to give the CPU time back though, busy looping for the 16 milliseconds to pass would be the wiser decision. The reason for this is that putting your program to sleep relies on the scheduler to wake the program up again in time, which is definitely not going to happen. That's fine for normal applications, but not for applications where milliseconds make a difference. Forcing a reschedule marks your application as nice, and will implicitly lower your priority within the scheduler. The contract is simple: You don't use everything, you don't need everything, so you are less likely to get scheduled. Again, not desirable in an application where time is critical. You want to burn CPU cycles that you don't use, simply to look active and maintain a high priority, stupid jittering just because the game got suddenly more CPU intensive is the least thing you want.
tl;dr: Don't use gamestudio for things it wasn't made.
Edit: And Kartoffel, please bring back the vibrant colours to your music player. The ones of your last screen without the saturation look pretty meh if anyone wants to know my opinion.
Last edited by JustSid; 10/06/13 14:27.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: minimize cpu usage
[Re: Superku]
#430942
10/06/13 14:19
10/06/13 14:19
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
User
|
User
Joined: Mar 2012
Posts: 927
cyberspace
|
Luckily i dont do sissyfit very well but what i do Do well is the following , **gone**
Compulsive compiler
|
|
|
Re: minimize cpu usage
[Re: Wjbender]
#430943
10/06/13 14:51
10/06/13 14:51
|
Joined: Sep 2009
Posts: 993 Budapest
Aku_Aku
User
|
User
Joined: Sep 2009
Posts: 993
Budapest
|
That is not enough, when you wrote You should give evidence of that. Now i am curious, why is so bad this language compared to c++?
|
|
|
Re: minimize cpu usage
[Re: Aku_Aku]
#430944
10/06/13 15:35
10/06/13 15:35
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
No, please don't do this here. Don't destroy Kartoffel's thread any further with this nonsense discussion. I know, I shouldn't have answered wjbenders troll post in the first place...
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: minimize cpu usage
[Re: Aku_Aku]
#430945
10/06/13 15:37
10/06/13 15:37
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
User
|
User
Joined: Mar 2012
Posts: 927
cyberspace
|
edit : said something good but saw the post above ..
so like i said gone .. i mentioned this is off topic but as others shared an oppinion i shared mine .. so go fuck yourself dude
sid everytime you write something i bow down , "me tiny grasshopper , you big master , you kung-fu gooooood"
Last edited by Wjbender; 10/06/13 15:42.
Compulsive compiler
|
|
|
Re: minimize cpu usage
[Re: Wjbender]
#430946
10/06/13 16:00
10/06/13 16:00
|
Joined: Jul 2013
Posts: 158
Feindbild
Member
|
Member
Joined: Jul 2013
Posts: 158
|
|
|
|
|