saving window top/left in the image, and what does it mean?

John M McIntosh johnmci at smalltalkconsulting.com
Wed Jan 24 04:59:05 UTC 2007


Well the headless flag means say for the unix vm it stubs in the  
sqUnixDisplayNull logic for things to do with the display.
like asking for it's size, drawing to it does nothing, etc.

Same basically for the mac carbon vm, if headless we don't create a  
main window, calls for window size return dummy value, drawing does  
nothing.
I'll note that basically drawing means copying bits from a squeak  
form to the display device for the platform,  so headless, why we  
just return.

The point that Tim makes is that currently there is an assumption  
that headful VMs make an window for display ID 1, automatically,  
versus changing the image so that Ffenestri would decide oh, I should  
create a window and anchor Display on it.

  10  years back  the mac VM open the window, ground along, resized  
the window based on choices in the image, then displayed the bits.    
Currently the mac carbon vm makes a hidden window of the size  
indicated by the image, then only shows the window when the first  
draw request comes  in.  This of course has led to some issues  
because if an image is so broken it cannot schedule a draw event you  
will not get a window, which means the cmd-key-period combination  
won't work because we need a window in order to accept the  
keystroke.  On the other hand the window doesn't come up white  
because squeak hasn't gotten around to drawing in. Mind this  
optimization is less apparent because machines are very fast now, but  
oh 8 years back it was a different story.

One thing of course to chase in all of this is how long does it take  
to get the image up in a sane state. The message tracing VM I build  
allows one to trace all message sends which might surprise people.    
I'lll note that allInstances is really slow, and asking for Foo  
someObject then Foo nextObject is really fast. mmm Ah trace yes on my  
idisk is a trace of image startup, in the experimental folder on my  
idisk, via http://www.smalltalkconsulting.com/squeak.html

MinimalImage-7061b.messageTraceFile.txt.zip

An interesting exercise for someone would be to turn it into  
something the MessageTally logic could work with.

Um of course Craig's work disposes of all those messages because he  
disposes of all the methods except the ones you actually need to do  
say your "2+2"

On Jan 23, 2007, at 7:52 PM, Keith Hodges wrote:

> Dear John,
>
> first of all I will say that I know very little about the vm, or  
> how squeak starts up. I have had a go at refactoring AutoStart and  
> I have had some ideas in that area.
>
> I am assuming that the vm is responsible for initializing a display  
> for squeak before squeak has got up and running to use it. Is this  
> the case? Does it have to be the case?
>
> I am interested in eventually producing a minimum image whose aim  
> is to handle the following command line (or similar).
>
> #squeak min.image Script e="2+2"
>
> I am wondering if the startup process for my minimum image is going  
> to always be slowed down by the initialization of the display that  
> I dont need.
>
> Does -headless skip the initialization of the display and send  
> drawing commands into the void? I dont know how headless works. Can  
> the image control whether it is headless or not?
>
> I know that I have a lot of questions, I hope that you can see why  
> I am asking them.
>
> what do you think?
>
> best regards
>
> Keith
>
> 	
> 	
> 		
> ___________________________________________________________ All new  
> Yahoo! Mail "The new Interface is stunning in its simplicity and  
> ease of use." - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===





More information about the Squeak-dev mailing list