1. Edita - Taking 99% of my cpu

Pete,

First off..really like the new version of Edita.  Great work!

The only issue I've run into is one two occasions now I notice my PC really
bogging down.  Looking at the performance tab under Ctl+Alt+Del I notice that
edita is taking 99% of the cpu.  This seems to happen after I launch an .exw file
from within Edita.

Anyone else have this issue?

Jonas Temple
http://www.innovativesys.net

new topic     » topic index » view message » categorize

2. Re: Edita - Taking 99% of my cpu

I get the same thing, but it doesn't really slow up the computer - it really
just replaces the System Idle process as the CPU hogger on my machine.

On Edita I also get:
Duplicate Backup errors (disappear when I vedb)
Simply crashing with no message and "disappearing"
Crashing with Euphoria Error Message (I've counted several different ones so
far)
Crashing with a machine exception with the message "Called from .." and then no
function name
Msgbox wanting "ex.err" after a successful execution when no ex.err file exists.

There are probably more, but those are just off the top of my head.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Edita - Taking 99% of my cpu

Jonas Temple wrote:
> 
> Pete,
> 
> First off..really like the new version of Edita.  Great work!
> 
> The only issue I've run into is one two occasions now I notice my PC really
> bogging down.  Looking at the performance tab under Ctl+Alt+Del I notice that
> edita is taking 99% of the cpu.  This seems to happen after I launch an .exw
> file from within Edita.
> 
> Anyone else have this issue?
> 
> Jonas Temple
> <a href="http://www.innovativesys.net">http://www.innovativesys.net</a>

Yes Jonas,

I have the same result when running Edita 0.2.7 (Probably not the latest
 release). I  would  not call it a problem because this only occurs when running,
 testing, experimenting or otherwise playing with the .exw file.
 Once the program is bound I don't get any unusual cpu usage.

  So I see no need to worry about it. If Edita.exe is not using the 99% 
CPU useage then System Idle Process is.
         
Don Cole

new topic     » goto parent     » topic index » view message » categorize

4. Re: Edita - Taking 99% of my cpu

Jonas Temple wrote:
> 
> Pete,
> 
> First off..really like the new version of Edita.  Great work!
> 
> The only issue I've run into is one two occasions now I notice my PC really
> bogging down.  Looking at the performance tab under Ctl+Alt+Del I notice that
> edita is taking 99% of the cpu.  This seems to happen after I launch an .exw
> file from within Edita.
> 
> Anyone else have this issue?
> 
A change made between 0.2.6 and 0.2.7 is that I commented out the "goIdle=1"
line in IdleHandler(), putting this back stopped the 100% load problem.
However, if test.exw contains say ?9/0 it also stops Edita from noticing that
the app has terminated, after pressing return on the console, until you do
something like move the mouse. It will in fact never notice on its own accord,
hence I would prefer not to make the above change.

What it is supposed to do here is call CheckCaptured() 4 times a second, which
should not hog 100% cpu. What the above change effectively does is give up and
just call stopIdle().

I tried changing IDLETIME to 7250 (7.25 seconds) to no avail. I also tried
(warning, this is a bit silly, just a test) replacing the "goIdle=1" with "if not
goIdle then goIdle=2 end if" and the last bit with
if goIdle=2 then
    sleep(1)
else
    stopIdle()
end if

which showed some hope but not unsurprisingly made Edita completely unusable.
I have no idea what to try next, but it is clearly around that area.

Anyone have any bright ideas?

Regards,
Pete
PS A couple of people have claimed this just replaces the System Idle process.
Clearly this is a real problem - at least for single processor systems - when you
run an app from Edita it will get no more than 50% cpu time granted to it by the
OS, so it is going to run quite a bit slower.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Edita - Taking 99% of my cpu

Pete Lomax wrote:
> 
> A change made between 0.2.6 and 0.2.7 is that I commented out the "goIdle=1"
> line in IdleHandler(), putting this back stopped the 100% load problem.
> However, if test.exw contains say ?9/0 it also stops Edita from noticing that
> the app has terminated, after pressing return on the console, until you do
> something
> like move the mouse. It will in fact never notice on its own accord, hence I
> would prefer not to make the above change.
> 
> What it is supposed to do here is call CheckCaptured() 4 times a second, which
> should not hog 100% cpu. What the above change effectively does is give up and
> just call stopIdle().
> 

<snip>

I'm not familiar with the internals of edita, but it sounds like you have
a loop in there where you're polling to see if the process has completed,
and also occasionally checking for ui events.  If that's not the case, then
you can maybe disregard the rest of what I'm about to say.

If you are, then a better way would seem to be to set up a timer to fire
every 250 msec, and check for the process then.  Once the process has stopped, 
kill the timer, and do whatever else you need to do (read ex.err, etc).

Matt

new topic     » goto parent     » topic index » view message » categorize

6. Re: Edita - Taking 99% of my cpu

I'm not sure i understand how that part of edita works, but have you looked at
my idle task library? http://www.rapideuphoria.com/idle.e

A Euphoria program will use 100% cpu when there is less than 1 second between
scheduled tasks! But my library lets you create a task that will be called when
no other tasks are scheduled which simple sleeps for a fraction of a second.

Also included is a procedure called nanosleep() that should work on windows or
linux.

~Ryan W. Johnson

Fluid Application Environment
http://www.fluidae.com/

[cool quote here, if i ever think of one...]

new topic     » goto parent     » topic index » view message » categorize

7. Re: Edita - Taking 99% of my cpu

Matt Lewis wrote:
> a better way would seem to be to set up a timer to fire every 250 msec, 
> and check for the process then.  Once the process has stopped,
> kill the timer, and do whatever else you need to do (read ex.err, etc).

Thanks Matt, that seems to work.

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu