Fukki

How to get full CPU usage

9 posts in this topic

Hello, I'm noob for this program

But i have question on CPU usage

when run the script CPU can't active to 100%

yes, it use 1 core on CPU

so i want to get full usage for speed process

and limit it in sometime

i hope someone can help me to fix this

and i say thank you for help

Share this post


Link to post
Share on other sites



hello Fukki, welcome to AutoIt and the forum!

if your script gets to 100% CPU utilization, there is most likely something wrong with it. adding more CPU cores to run it will not help.

post your code so we can examine it and help you better.

Share this post


Link to post
Share on other sites

@orbs Please read the question carefully


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

Fukki,

ProcessSetPriority might be what you are looking for. :)

M23

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

You cannot achieve your goal with AutoIt properly. There are a lot of topics regarding multi threading but the conclusion is that AutoIt is not able to handle mt properly.

What you can do is to add a sleep($x) to your loop where $x can vary. sleep(0) = no wait.

As far as I understood you, modifying the process priority is not what you try to achieve.

 

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

so i want to get full usage for speed process

and limit it in sometime

 

But this is very easy.. do:

 

Global $ImCrazy=1
While $ImCrazy
WEnd
Exit(-$ImCrazy)
Sleep(100) ;<Too late
At least you could heard the CPU fan nicely ;) Edited by zalomalo

My english shucks, i know it.

Share this post


Link to post
Share on other sites

Nope, still 1 core (24.9%) - AMD Athlon II 620 Quad Core


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Nope, still 1 core (24.9%) - AMD Athlon II 620 Quad Core

25% of 4 cores = 100% of 1 core. By the way, you very excepcionally will see using more than a Core in a NO-Game proccess, like WindowsMediaPlayer playing just a mp3 audio = HugeHyperCrazy Crap software.

So 99.9%. :)

Edited by zalomalo

My english shucks, i know it.

Share this post


Link to post
Share on other sites

Which brings us back to the OPs original ?

 

But i have question on CPU usage

when run the script CPU can't active to 100%

yes, it use 1 core on CPU

 

UEZ nailed it with AI cannot multi thread


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now