Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Dancelot Gaiming
4
Years of Service
User Offline
Joined: 11th Oct 2019
Location:
Posted: 14th Oct 2021 19:12


the darkbasic stuff that i made uses way too much power on my machine is that a problem? if it is then how do I fix it?

Attachments

Login to view attachments
Bored of the Rings
User Banned
Posted: 14th Oct 2021 20:33
sync on : sync rate 30 : sync

sync rate 30 will save battery power
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 14th Oct 2021 20:34
sync on : sync rate 30 : sync
at the top of your program

sync rate 30 will save battery power
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Dancelot Gaiming
4
Years of Service
User Offline
Joined: 11th Oct 2019
Location:
Posted: 14th Oct 2021 20:42
i did that on the program AND IT STILL PEAKS

what did I do wrong?
Bored of the Rings
User Banned
Posted: 14th Oct 2021 20:52
well thats a bit difficult to know, I can't see your computer or your code.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Dancelot Gaiming
4
Years of Service
User Offline
Joined: 11th Oct 2019
Location:
Posted: 14th Oct 2021 20:57


my specs



the code



the task manager

when i made a dark basic project the battery power just peaks
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 14th Oct 2021 23:57
Ignore it...

The "Power Usage" listed in the Task Manager is merely an estimate based upon the Frequency and Core Utilisation., and Intel Processors have a "1-Core Mode" where it'll push the frequency just a little higher than it's specified Peak Frequency.
This'll make the Task Manager freak out a little and bit like "OMG it's using so much power!"... when in reality it isn't (but it the CPU will definitely be generating a lot of heat).

I mean that's a 6 Core / 6 Thread 65w Processor., at most 1 Core (which is all it'll be using DBP doesn't support Multi-Core) will be used; which will kick in the 1-Core Mode on an Intel CPU; so it'll be using say 25w (worst case)... but because it'll be running ~95 - 99% Utilisation at say 4.2 - 4.3GHz; yeah Windows will be freaking out, thinking it's heavily using power.
If you download CPU-Z., there is Real-Time Monitoring, which includes a Power Utilisation on there; which actually talks to the CPU asking how much power it thinks it's using (although again it's still just an estimation., only way to know for sure is to physically measure the CPU Power Rails) and it won't be freaking out thinking your CPU is using as much power.

Keep in mind that your GPU can use up to 75w as well (and at 41% Utilisation means it's likely using ~30w itself).
Mind I'd say this somewhat makes me smile a little you're so concerned about that., given my CPU uses 95w "Under-Load" and my GPU uses 190w "Under-Load"... and frankly they're not what kick my electricity bills arse., it's my Displays.
If I take my Displays out of "Eco" Mode., I'll go from using 60p / Day to £1.50 / Day (avg. 12hr usage)... of course we are talking about a 65" 4K HDR Display., so your mileage might vary there; but yeah, non-eco mode; it'll essentially match or use more than what my PC does while Gaming with something that pushes it (like Cyberpunk 2077 for example).

As I said... ignore it, otherwise you'll just drive yourself crazy.
Seditious
10
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 15th Oct 2021 15:42 Edited at: 15th Oct 2021 15:44
It's just poor programming - DBP pretty much runs at 100% all the time (maxing out a core) because it uses busy waiting, rather than properly suspending (it essentially uses a "for" loop continuously checking until the time has elapsed, instead of using a Sleep() system call or similar). The only way to avoid this is to either A) use vsync, which unfortunately requires that you use fullscreen exclusive mode, or B) use DLL functions to call Sleep for at least a millisecond in your main loop (depending on what the game/app is, and how performance is.
2002 - Present

Login to post a reply

Server time is: 2024-04-19 20:48:45
Your offset time is: 2024-04-19 20:48:45