Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

You'll likely get some alternate opinions on this, especially from the SysAdmin types amongst us, but that the algorithm used makes full use of your cpu should be seen as a good thing not a bad. Assuming the algorithm is optimal, if the code didn't utilise 100% of your cpu, then it would indicate the there was a bottleneck somewhere and it would therefore take longer, in elapsed time to complete.

That's a gross simplification of a complex issue, but to my way of thinking, there is little point in having a powerful processor, and then not utilising it to its fullest when the opportunity allows this. Of course, if the processor is shared, and the utilisation of one process is to the detriment of another, more or equally urgent task, it could be seen as a 'problem', but that is what priorities are for.

If you need or desire to lower usage of that one task, to favour others, you might look at using Win32::Process and the SetPriorityClass() call to acheive it. You should? be able to use Win32::Process::open() to obtain a OS native handle to the current task from its pid, and adjust the priority from with the same script, although I haven't actually tried this.

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller

In reply to Re: Perl::Magick maxes my systems processor usage by BrowserUk
in thread Perl::Magick maxes my systems processor usage by MrCromeDome

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2023-12-02 05:47 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (13 votes). Check out past polls.