Mail Archives: djgpp/2000/03/14/20:27:34
Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> escribió en el mensaje de noticias
Pine DOT SUN DOT 3 DOT 91 DOT 1000314094829 DOT 4527F-100000 AT is...
>
> On Mon, 13 Mar 2000, Rafael García wrote:
>
> > > >int getoption() {
> > > > while (!kbhit()) {
> > > > pause(); // or delay(50)
> > > > maintenance();
> > > > }
> > > > return getch();
> > > > }
> > > >
> I think the problem is that your `maintenance' function does something
> CPU-intensive, and that is the cause for what you see. It's only a
> guess, but since you didn't tell what does `maintenance' do, what else
> can I do?
>
> FWIW, I routinely run Emacs compiled with DJGPP, which does tons of
> complicated stuff inside its idle loop, and I don't see any visible
> effect on other DOS boxes. In particular, the CPU usage shows
> something like 5% when Emacs is idle. So I'm curious what could your
> program do to use the CPU so heavily.
I have tried the program in a PentiumII and it works fine: calling pause() y
have more than 500% performance gain in the other proccess. It works better
with my program waiting than with RHIDE waiting (my editor).
But the bad results I told, are with another computer I was using: a 486
laptop with 20Mb. There, I get better performance in the background proccess
when I'm typing to the foreground program :-)
In that machine is better to avoid calling pause().
I'll try to do more tests about this problem...
BTW: is it correct spell 'proccess'?
- Raw text -