If you have a hot loop and want to consume less processor time at the expense of slightly slower processing, you could insert some well-placed sleep or select statements into said loop. You could also use blocking I/O or non-blocking I/O with sleeps rather than hard-polling I/O if you're using hard-polling I/O now. Other than that very general advice and pointing you towards profilers for better ideas of where your hot spots are, I can't really say anything else useful without seeing some code.
In reply to Re: Perl using 100% CPU
by mr_mischief
in thread Perl using 100% CPU
by nwboy74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |