Setting the Process Priority
Does JDIC allow me to set the process priority for a Java application yet? Frequently I have problems with client side Java apps that'll hit 100% CPU usage far too easily locking out the entire desktop.. avoiding such tight loops isn't easy yield() dosnt help and you're forced to sleep for short periods every 100 iterations to bring the usage down. Plus it isn't always possible because third-party libraries aren't quite as considerate, validating/parsing an XML document via Xerces for example is one sure desktop freeze.
Currently I'm either using the Windows taskmanger to manually change the process priority of javaw processes to below normal, or I've a command line tool that I just need to pass a process name and priority to.. Infact I have a batch file on the desktop to do always do this for IntelliJ IDEA, which makes everything play nice.
I suppose what I really need is to set the priority at launch time. Although I could envision uses via System.exec.
This is important for anybody for anybody running multiple apps at the same time, and doubly so for anybody streaming media, listening to mp3s or recording tv or similar cpu-load/time-sensitive applications at the same time.
A possible Misc addtion?
If the JVM would just stop hoarding memory (in case it needs it again later?) and release some of that heap every now & again.. It'd make the desktop integration much nicer and make for speedier context switches between minimised and on-screen and less paging all-round..?