Lisp HUG Maillist Archive

(Lisp-HUG) Panes, Pains, and Processes...

Regards to the List:

I have been programming with CAPI for about a year now and have a question.

In one portion of my application, I have an interface that contains 
three small panes that display system states such as current 
date/time; battery power level (this application runs on a piece of 
mobile electronics); and occasional text status messages.

The three panes are forced to update their displays via their display 
callbacks once a second by another timed process "elsewhere" that 
invalidates each pane once a second.

Everything works well, but I see "jerky" updates in that when the 
status message display pane scrolls text (a line of pixels at a 
time), the other two panes freeze for the 2.5-seconds required to 
bit-scroll the text and do not update at all until the scrolling completes.

The status message display pane scrolls status messages a line of 
pixels at a time, with each scroll separated by a (sleep 0.1) which 
works well to yield nice fluid motion of the text - thus, the need 
for the (sleep).


Question:  Why don't the other panes update during the (sleep 
0.1)??????  CAPI acts as if all of it goes to sleep for that 100ms.

Question: I understand from somewhere that CAPI interfaces (or is it 
panes) are each implemented as separate MP processes. Is this the 
problem - that when I do the (sleep 0.1) that the process that runs 
the entire interface freezes for the 100ms and, thus, no other 
updates are able to happen???

Question: Does each individual pane have its own process - or is it 
that each interface with all of its panes is a single process???

Question: What is a rational way to get other panes in an interface 
to update when an update function needs to sleep for one reason or the other??


I appreciate any feedback. I believe that once I (finally) understand 
the relationship between CAPI and processes better, things that I see 
happen will make a bit more sense.

Regards,

Jack Harper
Secure Outcomes Inc.
Evergreen, Colorado USA




Re: (Lisp-HUG) Panes, Pains, and Processes...

Jack Harper wrote on Tue, 23 Mar 2010 09:53:21 -0600 18:53:
 
| Question: I understand from somewhere that CAPI interfaces (or is it 
| panes) are each implemented as separate MP processes. Is this the 
| problem - that when I do the (sleep 0.1) that the process that runs 
| the entire interface freezes for the 100ms and, thus, no other 
| updates are able to happen???

Exactly.
 
| Question: Does each individual pane have its own process - or is it 
| that each interface with all of its panes is a single process???

The latter is the case.
 
| Question: What is a rational way to get other panes in an interface 
| to update when an update function needs to sleep for one reason or the 
| other??

I would recommend mp:schedule-timer-relative for things like smooth scroll.
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru


Re: (Lisp-HUG) Panes, Pains, and Processes...

At 10:36 AM 3/23/2010, Dmitriy Ivanov wrote:
>Jack Harper wrote on Tue, 23 Mar 2010 09:53:21 -0600 18:53:
>
>| Question: I understand from somewhere that CAPI interfaces (or is it
>| panes) are each implemented as separate MP processes. Is this the
>| problem - that when I do the (sleep 0.1) that the process that runs
>| the entire interface freezes for the 100ms and, thus, no other
>| updates are able to happen???
>
>Exactly.
>
>| Question: Does each individual pane have its own process - or is it
>| that each interface with all of its panes is a single process???
>
>The latter is the case.
>
>| Question: What is a rational way to get other panes in an interface
>| to update when an update function needs to sleep for one reason or the
>| other??
>
>I would recommend mp:schedule-timer-relative for things like smooth scroll.
>--
>Sincerely,
>Dmitriy Ivanov
>lisp.ystok.ru


Thank You Dmitriy for the insights.

I appreciate it -- and the Fog begins to lift a bit.

Regards,

Jack Harper
Secure Outcomes Inc. 


Updated at: 2020-12-10 08:39 UTC