[squeak-dev] Squeak on a cellphone may need better blocking behavior

David T. Lewis lewis at mail.msen.com
Wed Sep 2 15:49:20 UTC 2020


On Wed, Sep 02, 2020 at 07:58:46AM -0700, Yoshiki Ohshima wrote:
> Besides Tweak, I have some recollection that Andreas was making the Android
> VM that was requires to be event-driven, and in turn making a Morphic image
> event-driven. Does anybody know how it went?
> 

Anreas' event-driven Android VM was successful. I had it installed on my
phone for several years. I think that it was downloaded from the Google Play
Store, but is no longer available there.

Ian provides a pointer to archived information and code http://squeakvm.org/

By "successful" I mean that the event-driven VM worked, and it was able to
run an image on my phone. I do not recall any issues with CPU consumption,
although I do not remember looking for that as an issue. In any case, it
ran on my phone with no obvious problems that I could notice.

It was clear that a good deal of work would be required in order make Squeak
itself usable on a device with no real keyboard or mouse.

Dave


> On Tue, Sep 1, 2020 at 6:28 PM Vanessa Freudenberg <vanessa at codefrau.net>
> wrote:
> 
> > On Tue, Sep 1, 2020 at 8:36 AM Eliot Miranda <eliot.miranda at gmail.com>
> > wrote:
> >
> >> Hi Tony,
> >>
> >>
> >> > On Sep 1, 2020, at 6:50 AM, Tony Garnock-Jones <
> >> tonyg at leastfixedpoint.com> wrote:
> >> >
> >> > ???It occurs to me that to get better power efficiency, Squeak may need to
> >> > learn how to go to sleep more often. At present it's using about a
> >> > quarter of a core on my phone when I'm not doing anything to it.
> >> >
> >> > JIT could help that, I guess; but more generally, it'd be nice just not
> >> > to be awake when there's nothing pressing to do...
> >>
> >> The solution is a modified event architecture and jettisoning
> >> relinquishProcessorForMilliseconds:.  Search the archives (squeak-dev &
> >> vm-dev) for ???event driven vm???.  This is work that should have been done a
> >> long time ago (I did this for the VisualWorks vm back at the turn of the
> >> century or thereabouts).  But it isn???t going to get done unless someone
> >> steps up.  My input queue is full to overflowing.
> >>
> >
> > Not just the VM, but we would also need to modify the image to be
> > event-driven.
> >
> > A lot of Morphic code works by polling for changes in state (typically in
> > a "step" method), rather than reacting to events. That is almost elegant in
> > its simplicity, but rather wasteful. It was designed before power
> > consumption became an issue we care about. Nowadays, Morphs should only be
> > stepping if they are actively animating something without user input.
> >
> > Basically, the UI process should sleep until there is an event, which
> > could be a user event, a timer event, or some asynchronous state change
> > (like a network package arrived, etc).
> >
> > I guess Morphic can accommodate that, or it might need a larger re-design.
> > E.g. Tweak was designed around every UI element running in a separate
> > thread, and sleeping until there was actually something to do.
> >
> > - Vanessa -
> >
> >
> 
> -- 
> -- Yoshiki

> 



More information about the Squeak-dev mailing list