Hi Ben,

On May 9, 2015, at 7:41 AM, Ben Coman <btc@openinworld.com> wrote:



On Sat, May 9, 2015 at 10:09 PM, Ben Coman <btc@openinworld.com> wrote:
From my limited experience bug hunting, calling #changed: from a thread other than the UI thread is a source of evil.  There are too many assumptions throughout the system that the UI is single threaded.  Can anyone advise me that is not a proper belief?

Then that implies that a Transcript implementation where #nextPut: direct calls #changed:
is not appropriate for use with multi-threaded applications.  In Pharo, #changed: is only called from #stepGlobal, which is called from doOneCycle:.  (This came about as a last minute bug fix before Pharo 3 release and maybe could use some cleanup.

Separating the UI from Transcript into its own viewer might be a good idea, but actually it would not solve Stef's case since his code would still be running in the UI thread -- unless the viewer ran in another thread, which would have its own complexities.

I think the point about efficiency is significant. The following example...
     Time millisecondsToRun: [ 1000 timesRepeat:  [ Transcript show: 'x' ] ]
on Squeak 4.5 --> 12749ms
on Pharo 50029 --> 2ms

As a point of comparison, on VW 8.0 --> 43817ms 
and so you might guess, VW 8.0 outputs each 'x' immediately.
cheers -ben

Way to go, Squeak!  Actually this is disappointing.  I'm rather frustrated with Squeak's slow transcript, and was hoping that VW would demonstrate it could be faster.  Looking at the Squeak implementation I only see an obvious 30% or so improvement via tuning.  Looks like good performance will take more work :-/



Eliot (phone)