Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: Toward more ruly background apps Date: Tue, 29 Nov 2011 16:47:38 -0800 Organization: Canadian Mind Products Lines: 44 Message-ID: References: <2qhsc7d9ib953i1tnipa8jm7i25jbdfhpo@4ax.com> <56ltc755vbhq5p6lui1lal1io7b1f0g3q1@4ax.com> Reply-To: Roedy Green NNTP-Posting-Host: Z2l1DcCELS0rATq8NqV4Sw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10343 On Thu, 24 Nov 2011 22:29:21 -0500, Fistulina Hepatica wrote, quoted or indirectly quoted someone who said : >The information at http://xona.com/2004/07/22.html (which another user >posted elsewhere in this thread) suggests how to start a process (such >as a JVM) with priority reduced from the outset. You would think it would work the way. If I am typing, and the OS notices either the echo is delayed more than a tenth of a second or I am typing very slowly (presumably because I can't see the echo), it should bump the priority of my task relative to everything else and schedule disk i/o so that not only my task gets priority, but other tasks use disk sparingly if I am doing any use at all. This is very dynamic. If I stop typing, priorities should revert to normal. In other words, treat the user the way they did in Tron. The scheduler is deep in the heart of the OS, unlikely easy to be tampered with. However, it might be possible for some privileged task to dynamically adjust task priorities based on its intercepting of all keystrokes, Given that keystrokes could appear is so many places it would require tapping into many places to notice the echo. It would be a feature you build into the guts of the GUI. Perhaps just typing should crank your priority way up, even if you don't need it, even if the echo is already sufficiently fast. That might be something you could do within a single app without too much tricky system integration. . -- Roedy Green Canadian Mind Products http://mindprod.com For me, the appeal of computer progamming is that even though I am quite a klutz, I can still produce something, in a sense perfect, because the computer gives me as many chances as I please to get it right.