Java reduce CPU usage
- by steve
Greets-
We gots a few nutters in work who enjoy using
while(true) { //Code }
in their code. As you can imagine this maxes out the CPU. Does anyone know ways to reduce the CPU utilization so that other people can use the server as well.
The code itself is just constantly polling the internet for updates on sites. Therefore I'd imagine a little sleep method would greatly reduce the the CPU usage.
Also all manipulation is being done in String objects (Java) anyone know how much StringBuilders would reduce the over head by?
Thanks for any pointers