[Pharo-project] how to remove World?
Hi, I want to prevent squeak to load the world morph... it is for a process running on background, anyway, and I want to prevent the time taken to draw the main window... so, I tried some simple things like: Smalltalk at: World put: nil. but that doesn't work... so, any idea? Thanks, Esteban
s/squeak/pharo (sorry) On 2010-02-22 13:02:36 -0300, Esteban Lorenzano <estebanlm@gmail.com> said:
Hi, I want to prevent squeak to load the world morph... it is for a process running on background, anyway, and I want to prevent the time taken to draw the main window... so, I tried some simple things like:
Smalltalk at: World put: nil.
but that doesn't work... so, any idea?
Thanks, Esteban
but that doesn't work... so, any idea?
Project uiProcess suspend And the inverse is Project uiProcess resume For obvious reasons you won't be able to evaluate the resume from the frozen GUI, so you need to make some external trigger to reactivate the UI process (see WAScreenshot or WAVNCController in Seaside). Lukas -- Lukas Renggli http://www.lukas-renggli.ch
On 22 Feb 2010, at 17:16, Lukas Renggli wrote:
but that doesn't work... so, any idea?
Project uiProcess suspend
And the inverse is
Project uiProcess resume
Is that also necessary for a headless Pharo/Squeak? http://code.google.com/p/pharo/wiki/CommandLine Best regards Stefan
Is that also necessary for a headless Pharo/Squeak?
No, it is not necessary. It saves a few CPU cycles because the event polling stops, the #step methods on the visible morphs are not called anymore, and the display is not updated any longer. Programmatically you can still do everything (headless or non-headless). For example you can open morphs and move them around, you just won't see a change on the screen. Code that have some interaction with the GUI thread (like the debugger) might deadlock (or hang) the system. Lukas -- Lukas Renggli http://www.lukas-renggli.ch
I tried by starting pharo with a script: Project uiProcess suspend. Smalltalk snapshot: true andQuit: true. ...and the processing stop working after the #suspend (no snapshot:andQuit: happens :( ) On 2010-02-22 13:43:05 -0300, Lukas Renggli <renggli@gmail.com> said:
Is that also necessary for a headless Pharo/Squeak?
No, it is not necessary. It saves a few CPU cycles because the event polling stops, the #step methods on the visible morphs are not called anymore, and the display is not updated any longer.
Programmatically you can still do everything (headless or non-headless). For example you can open morphs and move them around, you just won't see a change on the screen. Code that have some interaction with the GUI thread (like the debugger) might deadlock (or hang) the system.
Lukas
On 22 February 2010 20:21, Esteban Lorenzano <estebanlm@gmail.com> wrote:
I tried by starting pharo with a script:
Project uiProcess suspend. Smalltalk     snapshot: true     andQuit: true.
...and the processing stop working after the #suspend (no snapshot:andQuit: happens :( )
I guess that means that the startup scripts are evaluated in the UI-Proces, so you suspend yourself ;-) Lukas -- Lukas Renggli http://www.lukas-renggli.ch
this is a really good experiment please continue and let us know the results. Stef On Feb 22, 2010, at 8:21 PM, Esteban Lorenzano wrote:
I tried by starting pharo with a script:
Project uiProcess suspend. Smalltalk snapshot: true andQuit: true.
...and the processing stop working after the #suspend (no snapshot:andQuit: happens :( )
On 2010-02-22 13:43:05 -0300, Lukas Renggli <renggli@gmail.com> said:
Is that also necessary for a headless Pharo/Squeak?
No, it is not necessary. It saves a few CPU cycles because the event polling stops, the #step methods on the visible morphs are not called anymore, and the display is not updated any longer.
Programmatically you can still do everything (headless or non-headless). For example you can open morphs and move them around, you just won't see a change on the screen. Code that have some interaction with the GUI thread (like the debugger) might deadlock (or hang) the system.
Lukas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
I think that maybe it is a good idea to use the DummyUIManager and the MorphicUIManager from Pavel MinimalImage. We can put those classes in a repository called PharoMinimal or something similar. Then, you will be able to load both classes, run your image headless and before, evaluate something to set those classes as the current. Just an idea... On Tue, Feb 23, 2010 at 10:18 AM, Stéphane Ducasse < stephane.ducasse@inria.fr> wrote:
this is a really good experiment please continue and let us know the results. Stef On Feb 22, 2010, at 8:21 PM, Esteban Lorenzano wrote:
I tried by starting pharo with a script:
Project uiProcess suspend. Smalltalk snapshot: true andQuit: true.
...and the processing stop working after the #suspend (no snapshot:andQuit: happens :( )
On 2010-02-22 13:43:05 -0300, Lukas Renggli <renggli@gmail.com> said:
Is that also necessary for a headless Pharo/Squeak?
No, it is not necessary. It saves a few CPU cycles because the event polling stops, the #step methods on the visible morphs are not called anymore, and the display is not updated any longer.
Programmatically you can still do everything (headless or non-headless). For example you can open morphs and move them around, you just won't see a change on the screen. Code that have some interaction with the GUI thread (like the debugger) might deadlock (or hang) the system.
Lukas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Yes this is a good idea. May be the DummyUIManager should be by default in the system. Can you open a ticket? Stef
I think that maybe it is a good idea to use the DummyUIManager and the MorphicUIManager from Pavel MinimalImage.
We can put those classes in a repository called PharoMinimal or something similar. Then, you will be able to load both classes, run your image headless and before, evaluate something to set those classes as the current.
Just an idea...
On Tue, Feb 23, 2010 at 10:18 AM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote: this is a really good experiment please continue and let us know the results. Stef On Feb 22, 2010, at 8:21 PM, Esteban Lorenzano wrote:
I tried by starting pharo with a script:
Project uiProcess suspend. Smalltalk snapshot: true andQuit: true.
...and the processing stop working after the #suspend (no snapshot:andQuit: happens :( )
On 2010-02-22 13:43:05 -0300, Lukas Renggli <renggli@gmail.com> said:
Is that also necessary for a headless Pharo/Squeak?
No, it is not necessary. It saves a few CPU cycles because the event polling stops, the #step methods on the visible morphs are not called anymore, and the display is not updated any longer.
Programmatically you can still do everything (headless or non-headless). For example you can open morphs and move them around, you just won't see a change on the screen. Code that have some interaction with the GUI thread (like the debugger) might deadlock (or hang) the system.
Lukas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Tue, Feb 23, 2010 at 6:37 PM, Stéphane Ducasse <stephane.ducasse@inria.fr
wrote:
Yes this is a good idea. May be the DummyUIManager should be by default in the system. Can you open a ticket?
Done: http://code.google.com/p/pharo/issues/detail?id=2069
Stef
I think that maybe it is a good idea to use the DummyUIManager and the MorphicUIManager from Pavel MinimalImage.
We can put those classes in a repository called PharoMinimal or something similar. Then, you will be able to load both classes, run your image headless and before, evaluate something to set those classes as the current.
Just an idea...
On Tue, Feb 23, 2010 at 10:18 AM, Stéphane Ducasse < stephane.ducasse@inria.fr> wrote: this is a really good experiment please continue and let us know the results. Stef On Feb 22, 2010, at 8:21 PM, Esteban Lorenzano wrote:
I tried by starting pharo with a script:
Project uiProcess suspend. Smalltalk snapshot: true andQuit: true.
...and the processing stop working after the #suspend (no snapshot:andQuit: happens :( )
On 2010-02-22 13:43:05 -0300, Lukas Renggli <renggli@gmail.com> said:
Is that also necessary for a headless Pharo/Squeak?
No, it is not necessary. It saves a few CPU cycles because the event polling stops, the #step methods on the visible morphs are not called anymore, and the display is not updated any longer.
Programmatically you can still do everything (headless or non-headless). For example you can open morphs and move them around, you just won't see a change on the screen. Code that have some interaction with the GUI thread (like the debugger) might deadlock (or hang) the system.
Lukas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Ok, I tried passing a .st by command line: UIManager default: DummyUIManager new. Project uiProcess terminate. SmalltalkImage current snapshot: true andQuit: true. but I fail miserably :'( (it stops do anything after "Project uiProcess terminate"... and the same using "Project uiProcess suspend") Any idea of how can I proceed from here? (I confess: I'm totally lost here) Cheers, Esteban On 2010-02-23 06:44:18 -0300, Mariano Martinez Peck <marianopeck@gmail.com> said:
I think that maybe it is a good idea to use the DummyUIManager and the MorphicUIManager from Pavel MinimalImage.
We can put those classes in a repository called PharoMinimal or something similar. Then, you will be able to load both classes, run your image headless and before, evaluate something to set those classes as the current= .
Just an idea...
On Tue, Feb 23, 2010 at 10:18 AM, St=E9phane Ducasse < stephane.ducasse@inria.fr> wrote:
this is a really good experiment please continue and let us know the results. Stef On Feb 22, 2010, at 8:21 PM, Esteban Lorenzano wrote:
I tried by starting pharo with a script:
Project uiProcess suspend. Smalltalk snapshot: true andQuit: true.
...and the processing stop working after the #suspend (no snapshot:andQuit: happens :( )
On 2010-02-22 13:43:05 -0300, Lukas Renggli <renggli@gmail.com> said:
Is that also necessary for a headless Pharo/Squeak?
No, it is not necessary. It saves a few CPU cycles because the event polling stops, the #step methods on the visible morphs are not called anymore, and the display is not updated any longer.
Programmatically you can still do everything (headless or non-headless). For example you can open morphs and move them around, you just won't see a change on the screen. Code that have some interaction with the GUI thread (like the debugger) might deadlock (or hang) the system.
Lukas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
I think that maybe it is a good idea to use the DummyUIManager and the Morp= hicUIManager=A0 from Pavel MinimalImage.<br><br>We can put those classes in= a repository called PharoMinimal or something similar. Then, you will be a= ble to load both classes, run your image headless and before, evaluate some= thing to set those classes as the current.<br> <br>Just an idea...<br><br><div class=3D"gmail_quote">On Tue, Feb 23, 2010 = at 10:18 AM, St=E9phane Ducasse <span dir=3D"ltr"><<a href=3D"mailto:ste= phane.ducasse@inria.fr">stephane.ducasse@inria.fr</a>></span> wrote:<br>= <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, = 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> this is a really good experiment<br> please continue<br> and let us know the results.<br> Stef<br> <div><div></div><div class=3D"h5">On Feb 22, 2010, at 8:21 PM, Esteban Lore= nzano wrote:<br> <br> > I tried by starting pharo with a script:<br> ><br> > Project uiProcess suspend.<br> > Smalltalk<br> > =A0 =A0 =A0 snapshot: true<br> > =A0 =A0 =A0 andQuit: true.<br> ><br> > ...and the processing stop working after the #suspend (no<br> > snapshot:andQuit: happens :( )<br> ><br> > On 2010-02-22 13:43:05 -0300, Lukas Renggli<br> > <<a href=3D"mailto:renggli@gmail.com">renggli@gmail.com</a>> sai= d:<br> ><br> >>> Is that also necessary for a headless Pharo/Squeak?<br> >><br> >> No, it is not necessary. It saves a few CPU cycles because the eve= nt<br> >> polling stops, the #step methods on the visible morphs are not cal= led<br> >> anymore, and the display is not updated any longer.<br> >><br> >> Programmatically you can still do everything (headless or<br> >> non-headless). For example you can open morphs and move them aroun= d,<br> >> you just won't see a change on the screen. Code that have some= <br> >> interaction with the GUI thread (like the debugger) might deadlock= (or<br> >> hang) the system.<br> >><br> >> Lukas<br> ><br> ><br> ><br> ><br> > _______________________________________________<br> > Pharo-project mailing list<br> > <a href=3D"mailto:Pharo-project@lists.gforge.inria.fr">Pharo-project@l=
ists.gforge.inria.fr</a><br> >
<a href=3D"http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo= -project" target=3D"_blank">http://lists.gforge.inria.fr/cgi-bin/mailman/li= stinfo/pharo-project</a><br> <br> <br> _______________________________________________<br> Pharo-project mailing list<br> <a href=3D"mailto:Pharo-project@lists.gforge.inria.fr">Pharo-project@lists.=
gforge.inria.fr</a><br> <a
href=3D"http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-proj= ect" target=3D"_blank">http://lists.gforge.inria.fr/cgi-bin/mailman/listinf= o/pharo-project</a><br> </div></div></blockquote></div><br>
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Hi, you do not need only the DummyUIManager but some modifications to MorphicUIManager from Pharo-Kernel. You should start with the scripts: DummyUIManager.st MorphicUIManager.st patch.st unload.st - here the UIProcess is stopped There's updated version of Pharo-Kernel here: http://gforge.inria.fr/frs/download.php/26462/PharoKernel-1.1-11229-UNSTABLE... However it's still very dirty and a lot of things will change soon. Cheers, -- Pavel On Thu, Feb 25, 2010 at 1:49 PM, Esteban Lorenzano <estebanlm@gmail.com> wrote:
Ok, I tried passing a .st by command line:
UIManager default: DummyUIManager new.
Project uiProcess terminate.
SmalltalkImage current snapshot: true andQuit: true.
but I fail miserably :'( (it stops do anything after "Project uiProcess terminate"... and the same using "Project uiProcess suspend")
Any idea of how can I proceed from here? (I confess: I'm totally lost here)
Cheers, Esteban
On 2010-02-23 06:44:18 -0300, Mariano Martinez Peck <marianopeck@gmail.com> said:
I think that maybe it is a good idea to use the DummyUIManager and the MorphicUIManager  from Pavel MinimalImage.
We can put those classes in a repository called PharoMinimal or something similar. Then, you will be able to load both classes, run your image headless and before, evaluate something to set those classes as the current= .
Just an idea...
On Tue, Feb 23, 2010 at 10:18 AM, St=E9phane Ducasse < stephane.ducasse@inria.fr> wrote:
this is a really good experiment please continue and let us know the results. Stef On Feb 22, 2010, at 8:21 PM, Esteban Lorenzano wrote:
I tried by starting pharo with a script:
Project uiProcess suspend. Smalltalk snapshot: true andQuit: true.
...and the processing stop working after the #suspend (no snapshot:andQuit: happens :( )
On 2010-02-22 13:43:05 -0300, Lukas Renggli <renggli@gmail.com> said:
Is that also necessary for a headless Pharo/Squeak?
No, it is not necessary. It saves a few CPU cycles because the event polling stops, the #step methods on the visible morphs are not called anymore, and the display is not updated any longer.
Programmatically you can still do everything (headless or non-headless). For example you can open morphs and move them around, you just won't see a change on the screen. Code that have some interaction with the GUI thread (like the debugger) might deadlock (or hang) the system.
Lukas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
I think that maybe it is a good idea to use the DummyUIManager and the Morp= hicUIManager=A0 from Pavel MinimalImage.<br><br>We can put those classes in= Â a repository called PharoMinimal or something similar. Then, you will be a= ble to load both classes, run your image headless and before, evaluate some= thing to set those classes as the current.<br> <br>Just an idea...<br><br><div class=3D"gmail_quote">On Tue, Feb 23, 2010 = at 10:18 AM, St=E9phane Ducasse <span dir=3D"ltr"><<a href=3D"mailto:ste= phane.ducasse@inria.fr">stephane.ducasse@inria.fr</a>></span> wrote:<br>= <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, = 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> this is a really good experiment<br> please continue<br> and let us know the results.<br> Stef<br> <div><div></div><div class=3D"h5">On Feb 22, 2010, at 8:21 PM, Esteban Lore= nzano wrote:<br> <br> > I tried by starting pharo with a script:<br> ><br> > Project uiProcess suspend.<br> > Smalltalk<br> > =A0 =A0 =A0 snapshot: true<br> > =A0 =A0 =A0 andQuit: true.<br> ><br> > ...and the processing stop working after the #suspend (no<br> > snapshot:andQuit: happens :( )<br> ><br> > On 2010-02-22 13:43:05 -0300, Lukas Renggli<br> > <<a href=3D"mailto:renggli@gmail.com">renggli@gmail.com</a>> sai= d:<br> ><br> >>> Is that also necessary for a headless Pharo/Squeak?<br> >><br> >> No, it is not necessary. It saves a few CPU cycles because the eve= nt<br> >> polling stops, the #step methods on the visible morphs are not cal= led<br> >> anymore, and the display is not updated any longer.<br> >><br> >> Programmatically you can still do everything (headless or<br> >> non-headless). For example you can open morphs and move them aroun= d,<br> >> you just won't see a change on the screen. Code that have some= <br> >> interaction with the GUI thread (like the debugger) might deadlock= Â (or<br> >> hang) the system.<br> >><br> >> Lukas<br> ><br> ><br> ><br> ><br> > _______________________________________________<br> > Pharo-project mailing list<br> > <a href=3D"mailto:Pharo-project@lists.gforge.inria.fr">Pharo-project@l=
ists.gforge.inria.fr</a><br> >
<a href=3D"http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo= -project" target=3D"_blank">http://lists.gforge.inria.fr/cgi-bin/mailman/li= stinfo/pharo-project</a><br> <br> <br> _______________________________________________<br> Pharo-project mailing list<br> <a href=3D"mailto:Pharo-project@lists.gforge.inria.fr">Pharo-project@lists.=
gforge.inria.fr</a><br> <a
href=3D"http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-proj= ect" target=3D"_blank">http://lists.gforge.inria.fr/cgi-bin/mailman/listinf= o/pharo-project</a><br> </div></div></blockquote></div><br>
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Den 25.02.2010 13:49, skrev Esteban Lorenzano:
Ok, I tried passing a .st by command line:
UIManager default: DummyUIManager new.
Project uiProcess terminate.
SmalltalkImage current snapshot: true andQuit: true.
but I fail miserably :'( (it stops do anything after "Project uiProcess terminate"... and the same using "Project uiProcess suspend")
Any idea of how can I proceed from here? (I confess: I'm totally lost here)
Cheers, Esteban
As Lukas already said, that's not very strange if the script is being executed by the uiProcess. (which it is if you're using the ProjectLauncher) You can't plan to kill yourself, then afterwards send a goodbye-letter to your friends, you need to get someone else to perform the actions if you want to be sure it happens. (ie. fork off the execution) Cheers, Henry
participants (7)
-
Esteban Lorenzano -
Henrik Johansen -
Lukas Renggli -
Mariano Martinez Peck -
Pavel Krivanek -
Stefan Marr -
Stéphane Ducasse