Curious drawing performance issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Curious drawing performance issue

Phil B
I noticed a while back that something appeared to be going on with Cuis
drawing performance (at idle on my system Morphic consumes ~20% of VM
CPU *miniumum* according to ProcessBrowser) and this seems to give an
indication of what it's currently costing in drawing performance...

After seeing the Squeak 5.0 announcement, I was curious to see roughly
how much of a speed boost we might be able to expect from Spur down the
road.  So I decided to look at BouncingAtomsMorph to try to get a rough
apples-to-apples comparison and was quite surprised: Spur was faster,
but it was too much faster.  So I dropped back to Squeak 4.5 and it also
performs much, much better than the Cuis version on the same VM.   Here
are the numbers I'm seeing using BouncingAtomsMorph with roughly
comparable (i.e. eyeballed) morph sizes and atom count set to 5000:
Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
Cuis 2440 (Cog VM 15.25.3390): 6-8 fps

Granted BouncingAtomsMorph is not 100% identical from a source code
standpoint but it's not nearly different enough where I'd expect that
sort of difference.  Is this a platform-specific issue (I'm on Linux) or
are others noticing drawing issues as well?


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Phil B
I should also mention that the Morph window is ~ 500x450 and #stepTime
is set to 0 for anyone who wants to try to replicate...

On Wed, 2015-08-12 at 17:36 -0400, Phil (list) wrote:

> I noticed a while back that something appeared to be going on with Cuis
> drawing performance (at idle on my system Morphic consumes ~20% of VM
> CPU *miniumum* according to ProcessBrowser) and this seems to give an
> indication of what it's currently costing in drawing performance...
>
> After seeing the Squeak 5.0 announcement, I was curious to see roughly
> how much of a speed boost we might be able to expect from Spur down the
> road.  So I decided to look at BouncingAtomsMorph to try to get a rough
> apples-to-apples comparison and was quite surprised: Spur was faster,
> but it was too much faster.  So I dropped back to Squeak 4.5 and it also
> performs much, much better than the Cuis version on the same VM.   Here
> are the numbers I'm seeing using BouncingAtomsMorph with roughly
> comparable (i.e. eyeballed) morph sizes and atom count set to 5000:
> Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
>
> Granted BouncingAtomsMorph is not 100% identical from a source code
> standpoint but it's not nearly different enough where I'd expect that
> sort of difference.  Is this a platform-specific issue (I'm on Linux) or
> are others noticing drawing issues as well?



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Dan Norton
Hi Phil,

On Windows 7 with Cuis loaded and idle, Windows Task Manager > Performance reports 0%
CPU Usage. Memory Usage is 1.28 GB.

With BouncingAtoms morphExtent: 500@450, stepTime 0, nAtoms 5000 the report is 24 -
25% CPU Usage, 1.28 GB Memory Usage, 2 - 6 fps.

Cuis 4.2 2449, cogwin 15.22.3370

 - Dan

On 12 Aug 2015 at 17:44, Phil (list) wrote:

> I should also mention that the Morph window is ~ 500x450 and
> #stepTime
> is set to 0 for anyone who wants to try to replicate...
>
> On Wed, 2015-08-12 at 17:36 -0400, Phil (list) wrote:
> > I noticed a while back that something appeared to be going on with
> Cuis
> > drawing performance (at idle on my system Morphic consumes ~20% of
> VM
> > CPU *miniumum* according to ProcessBrowser) and this seems to give
> an
> > indication of what it's currently costing in drawing
> performance...
> >
> > After seeing the Squeak 5.0 announcement, I was curious to see
> roughly
> > how much of a speed boost we might be able to expect from Spur
> down the
> > road.  So I decided to look at BouncingAtomsMorph to try to get a
> rough
> > apples-to-apples comparison and was quite surprised: Spur was
> faster,
> > but it was too much faster.  So I dropped back to Squeak 4.5 and
> it also
> > performs much, much better than the Cuis version on the same VM.  
> Here
> > are the numbers I'm seeing using BouncingAtomsMorph with roughly
> > comparable (i.e. eyeballed) morph sizes and atom count set to
> 5000:
> > Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> > Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> > Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
> >
> > Granted BouncingAtomsMorph is not 100% identical from a source
> code
> > standpoint but it's not nearly different enough where I'd expect
> that
> > sort of difference.  Is this a platform-specific issue (I'm on
> Linux) or
> > are others noticing drawing issues as well?
>
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Phil B
Dan,


On Wed, 2015-08-12 at 22:17 -0400, Dan Norton wrote:
> Hi Phil,
>
> On Windows 7 with Cuis loaded and idle, Windows Task Manager > Performance reports 0%
> CPU Usage. Memory Usage is 1.28 GB.
>

What does the cpu usage show via World Menu -> Open... -> Process
Browser for Morphic?

> With BouncingAtoms morphExtent: 500@450, stepTime 0, nAtoms 5000 the report is 24 -
> 25% CPU Usage, 1.28 GB Memory Usage, 2 - 6 fps.
>

OK, so it's not platform specific poor performance.  If you close the
BouncingAtomsMorph and wait for things to settle for a few seconds, what
does Process Browser show the Morphic cpu usage as??

> Cuis 4.2 2449, cogwin 15.22.3370
>
>  - Dan
>

Thanks,
Phil

> On 12 Aug 2015 at 17:44, Phil (list) wrote:
>
> > I should also mention that the Morph window is ~ 500x450 and
> > #stepTime
> > is set to 0 for anyone who wants to try to replicate...
> >
> > On Wed, 2015-08-12 at 17:36 -0400, Phil (list) wrote:
> > > I noticed a while back that something appeared to be going on with
> > Cuis
> > > drawing performance (at idle on my system Morphic consumes ~20% of
> > VM
> > > CPU *miniumum* according to ProcessBrowser) and this seems to give
> > an
> > > indication of what it's currently costing in drawing
> > performance...
> > >
> > > After seeing the Squeak 5.0 announcement, I was curious to see
> > roughly
> > > how much of a speed boost we might be able to expect from Spur
> > down the
> > > road.  So I decided to look at BouncingAtomsMorph to try to get a
> > rough
> > > apples-to-apples comparison and was quite surprised: Spur was
> > faster,
> > > but it was too much faster.  So I dropped back to Squeak 4.5 and
> > it also
> > > performs much, much better than the Cuis version on the same VM.  
> > Here
> > > are the numbers I'm seeing using BouncingAtomsMorph with roughly
> > > comparable (i.e. eyeballed) morph sizes and atom count set to
> > 5000:
> > > Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> > > Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> > > Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
> > >
> > > Granted BouncingAtomsMorph is not 100% identical from a source
> > code
> > > standpoint but it's not nearly different enough where I'd expect
> > that
> > > sort of difference.  Is this a platform-specific issue (I'm on
> > Linux) or
> > > are others noticing drawing issues as well?
> >
> >
> >
> > _______________________________________________
> > Cuis mailing list
> > [hidden email]
> > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Dan Norton
On 13 Aug 2015 at 2:29, Phil (list) wrote:

> Dan,
>
>
> On Wed, 2015-08-12 at 22:17 -0400, Dan Norton wrote:
> > Hi Phil,
> >
> > On Windows 7 with Cuis loaded and idle, Windows Task Manager >
> Performance reports 0%
> > CPU Usage. Memory Usage is 1.28 GB.
> >
>
> What does the cpu usage show via World Menu -> Open... -> Process
> Browser for Morphic?
>

It shows 12%.

> > With BouncingAtoms morphExtent: 500@450, stepTime 0, nAtoms 5000
> the report is 24 -
> > 25% CPU Usage, 1.28 GB Memory Usage, 2 - 6 fps.
> >
>
> OK, so it's not platform specific poor performance.  If you close
> the
> BouncingAtomsMorph and wait for things to settle for a few seconds,
> what
> does Process Browser show the Morphic cpu usage as??
>

It shows 40%. However, Win7 shows 1 - 2%. Using Process Browser to measure absolute as
opposed to relative CPU usage seems inaccurate to me. The /difference/ in Process Browser
numbers while atoms is running vs not running agree with Win7: 1 - 2%.

I don't like for something to try to measure its own performance :-) - an independent
instrument is preferable IMHO.
 

> > Cuis 4.2 2449, cogwin 15.22.3370
> >
> >  - Dan
> >
>
> Thanks,
> Phil
>
> > On 12 Aug 2015 at 17:44, Phil (list) wrote:
> >
> > > I should also mention that the Morph window is ~ 500x450 and
> > > #stepTime
> > > is set to 0 for anyone who wants to try to replicate...
> > >
> > > On Wed, 2015-08-12 at 17:36 -0400, Phil (list) wrote:
> > > > I noticed a while back that something appeared to be going on
> with
> > > Cuis
> > > > drawing performance (at idle on my system Morphic consumes
> ~20% of
> > > VM
> > > > CPU *miniumum* according to ProcessBrowser) and this seems to
> give
> > > an
> > > > indication of what it's currently costing in drawing
> > > performance...
> > > >
> > > > After seeing the Squeak 5.0 announcement, I was curious to
> see
> > > roughly
> > > > how much of a speed boost we might be able to expect from
> Spur
> > > down the
> > > > road.  So I decided to look at BouncingAtomsMorph to try to
> get a
> > > rough
> > > > apples-to-apples comparison and was quite surprised: Spur
> was
> > > faster,
> > > > but it was too much faster.  So I dropped back to Squeak 4.5
> and
> > > it also
> > > > performs much, much better than the Cuis version on the same
> VM.  
> > > Here
> > > > are the numbers I'm seeing using BouncingAtomsMorph with
> roughly
> > > > comparable (i.e. eyeballed) morph sizes and atom count set
> to
> > > 5000:
> > > > Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> > > > Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> > > > Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
> > > >
> > > > Granted BouncingAtomsMorph is not 100% identical from a
> source
> > > code
> > > > standpoint but it's not nearly different enough where I'd
> expect
> > > that
> > > > sort of difference.  Is this a platform-specific issue (I'm
> on
> > > Linux) or
> > > > are others noticing drawing issues as well?
> > >
> > >
> > >
> > > _______________________________________________
> > > Cuis mailing list
> > > [hidden email]
> > > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> >
> >
> >
> > _______________________________________________
> > Cuis mailing list
> > [hidden email]
> > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Phil B
On Thu, 2015-08-13 at 11:11 -0400, Dan Norton wrote:

> On 13 Aug 2015 at 2:29, Phil (list) wrote:
>
> > Dan,
> >
> >
> > On Wed, 2015-08-12 at 22:17 -0400, Dan Norton wrote:
> > > Hi Phil,
> > >
> > > On Windows 7 with Cuis loaded and idle, Windows Task Manager >
> > Performance reports 0%
> > > CPU Usage. Memory Usage is 1.28 GB.
> > >
> >
> > What does the cpu usage show via World Menu -> Open... -> Process
> > Browser for Morphic?
> >
>
> It shows 12%.
>
> > > With BouncingAtoms morphExtent: 500@450, stepTime 0, nAtoms 5000
> > the report is 24 -
> > > 25% CPU Usage, 1.28 GB Memory Usage, 2 - 6 fps.
> > >
> >
> > OK, so it's not platform specific poor performance.  If you close
> > the
> > BouncingAtomsMorph and wait for things to settle for a few seconds,
> > what
> > does Process Browser show the Morphic cpu usage as??
> >
>
> It shows 40%. However, Win7 shows 1 - 2%. Using Process Browser to measure absolute as
> opposed to relative CPU usage seems inaccurate to me. The /difference/ in Process Browser
> numbers while atoms is running vs not running agree with Win7: 1 - 2%.
>
> I don't like for something to try to measure its own performance :-) - an independent
> instrument is preferable IMHO.

True, the external monitoring tools will tend to give you a better
absolute picture as there may be some VM overhead (esp if plugins are
involved) that Process Browser can't see.  However, CPU utilization as
reported by the OS isn't terribly helpful unless you know how many cores
the system has, was anything else active at the time, etc.
ProcessBrowser, while limited, avoids all that since it shows what was
used vs what was available to it. (usually 100/<num cores> % of total
system CPU)  Just seemed to make for a better apples to apples
comparison in this case to see if you are having the same issue re:
Morphic chewing up cycles while otherwise 'idle'.

>  
> > > Cuis 4.2 2449, cogwin 15.22.3370
> > >
> > >  - Dan
> > >
> >
> > Thanks,
> > Phil
> >
> > > On 12 Aug 2015 at 17:44, Phil (list) wrote:
> > >
> > > > I should also mention that the Morph window is ~ 500x450 and
> > > > #stepTime
> > > > is set to 0 for anyone who wants to try to replicate...
> > > >
> > > > On Wed, 2015-08-12 at 17:36 -0400, Phil (list) wrote:
> > > > > I noticed a while back that something appeared to be going on
> > with
> > > > Cuis
> > > > > drawing performance (at idle on my system Morphic consumes
> > ~20% of
> > > > VM
> > > > > CPU *miniumum* according to ProcessBrowser) and this seems to
> > give
> > > > an
> > > > > indication of what it's currently costing in drawing
> > > > performance...
> > > > >
> > > > > After seeing the Squeak 5.0 announcement, I was curious to
> > see
> > > > roughly
> > > > > how much of a speed boost we might be able to expect from
> > Spur
> > > > down the
> > > > > road.  So I decided to look at BouncingAtomsMorph to try to
> > get a
> > > > rough
> > > > > apples-to-apples comparison and was quite surprised: Spur
> > was
> > > > faster,
> > > > > but it was too much faster.  So I dropped back to Squeak 4.5
> > and
> > > > it also
> > > > > performs much, much better than the Cuis version on the same
> > VM.  
> > > > Here
> > > > > are the numbers I'm seeing using BouncingAtomsMorph with
> > roughly
> > > > > comparable (i.e. eyeballed) morph sizes and atom count set
> > to
> > > > 5000:
> > > > > Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> > > > > Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> > > > > Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
> > > > >
> > > > > Granted BouncingAtomsMorph is not 100% identical from a
> > source
> > > > code
> > > > > standpoint but it's not nearly different enough where I'd
> > expect
> > > > that
> > > > > sort of difference.  Is this a platform-specific issue (I'm
> > on
> > > > Linux) or
> > > > > are others noticing drawing issues as well?
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Cuis mailing list
> > > > [hidden email]
> > > > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> > >
> > >
> > >
> > > _______________________________________________
> > > Cuis mailing list
> > > [hidden email]
> > > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> >
> >
> >
> > _______________________________________________
> > Cuis mailing list
> > [hidden email]
> > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Dan Norton
On 13 Aug 2015 at 16:01, Phil (list) wrote:

> On Thu, 2015-08-13 at 11:11 -0400, Dan Norton wrote:
> > On 13 Aug 2015 at 2:29, Phil (list) wrote:
> >
> > > Dan,
> > >
> > >
> > > On Wed, 2015-08-12 at 22:17 -0400, Dan Norton wrote:
> > > > Hi Phil,
> > > >
> > > > On Windows 7 with Cuis loaded and idle, Windows Task Manager
> >
> > > Performance reports 0%
> > > > CPU Usage. Memory Usage is 1.28 GB.
> > > >
> > >
> > > What does the cpu usage show via World Menu -> Open... ->
> Process
> > > Browser for Morphic?
> > >
> >
> > It shows 12%.
> >
> > > > With BouncingAtoms morphExtent: 500@450, stepTime 0, nAtoms
> 5000
> > > the report is 24 -
> > > > 25% CPU Usage, 1.28 GB Memory Usage, 2 - 6 fps.
> > > >
> > >
> > > OK, so it's not platform specific poor performance.  If you
> close
> > > the
> > > BouncingAtomsMorph and wait for things to settle for a few
> seconds,
> > > what
> > > does Process Browser show the Morphic cpu usage as??
> > >
> >
> > It shows 40%. However, Win7 shows 1 - 2%. Using Process Browser to
> measure absolute as
> > opposed to relative CPU usage seems inaccurate to me. The
> /difference/ in Process Browser
> > numbers while atoms is running vs not running agree with Win7: 1 -
> 2%.
> >
> > I don't like for something to try to measure its own performance
> :-) - an independent
> > instrument is preferable IMHO.
>
> True, the external monitoring tools will tend to give you a better
> absolute picture as there may be some VM overhead (esp if plugins
> are
> involved) that Process Browser can't see.  However, CPU utilization
> as
> reported by the OS isn't terribly helpful unless you know how many
> cores
> the system has, was anything else active at the time, etc.
> ProcessBrowser, while limited, avoids all that since it shows what
> was
> used vs what was available to it. (usually 100/<num cores> % of
> total
> system CPU)  Just seemed to make for a better apples to apples
> comparison in this case to see if you are having the same issue
> re:
> Morphic chewing up cycles while otherwise 'idle'.
>

Rummaging around in my system reveals:

Microsoft Windows 7 Home Premium
6.1.7601 Service Pack 1

Intel(R) Core(TM) i3-2125 CPU @
3.30 GHz

All Programs>Accessories>System Tools>Resource Monitor shows:

an appalling (to me, at least) >170 threads "if the only tool you have is a hammer, every
problem looks like a nail" sitting there quietly for the most part. Resource Monitor shows four
"CPUs" with CPU 1 and CPU 3 parked. Total CPU usage < 1%.

When Cuis is started, the Squeak.exe starts out with 17 threads, then eventually settles to 6
threads. Total CPU usage < 1%.

When BouncingAtoms is running, set up as above, CPU 1 and CPU 3 remain parked, CPU 0
< 5%, and CPU 2 > 95%. Occasionally something (GC?) cranks CPU 0 to 85 - 90% briefly.

When BouncingAtoms is stopped, all return to CPU 0 < 5%, CPU 2 <1%, CPU 1 and CPU 3
parked.

So, the question is why should Cuis process browser report that Morphic UI is consuming 10
- 14% ?

> >  
> > > > Cuis 4.2 2449, cogwin 15.22.3370
> > > >
> > > >  - Dan
> > > >
> > >
> > > Thanks,
> > > Phil
> > >
> > > > On 12 Aug 2015 at 17:44, Phil (list) wrote:
> > > >
> > > > > I should also mention that the Morph window is ~ 500x450
> and
> > > > > #stepTime
> > > > > is set to 0 for anyone who wants to try to replicate...
> > > > >
> > > > > On Wed, 2015-08-12 at 17:36 -0400, Phil (list) wrote:
> > > > > > I noticed a while back that something appeared to be going
> on
> > > with
> > > > > Cuis
> > > > > > drawing performance (at idle on my system Morphic
> consumes
> > > ~20% of
> > > > > VM
> > > > > > CPU *miniumum* according to ProcessBrowser) and this seems
> to
> > > give
> > > > > an
> > > > > > indication of what it's currently costing in drawing
> > > > > performance...
> > > > > >
> > > > > > After seeing the Squeak 5.0 announcement, I was curious
> to
> > > see
> > > > > roughly
> > > > > > how much of a speed boost we might be able to expect
> from
> > > Spur
> > > > > down the
> > > > > > road.  So I decided to look at BouncingAtomsMorph to try
> to
> > > get a
> > > > > rough
> > > > > > apples-to-apples comparison and was quite surprised:
> Spur
> > > was
> > > > > faster,
> > > > > > but it was too much faster.  So I dropped back to Squeak
> 4.5
> > > and
> > > > > it also
> > > > > > performs much, much better than the Cuis version on the
> same
> > > VM.  
> > > > > Here
> > > > > > are the numbers I'm seeing using BouncingAtomsMorph with
> > > roughly
> > > > > > comparable (i.e. eyeballed) morph sizes and atom count
> set
> > > to
> > > > > 5000:
> > > > > > Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> > > > > > Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> > > > > > Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
> > > > > >
> > > > > > Granted BouncingAtomsMorph is not 100% identical from a
> > > source
> > > > > code
> > > > > > standpoint but it's not nearly different enough where
> I'd
> > > expect
> > > > > that
> > > > > > sort of difference.  Is this a platform-specific issue
> (I'm
> > > on
> > > > > Linux) or
> > > > > > are others noticing drawing issues as well?
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Cuis mailing list
> > > > > [hidden email]
> > > > > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Cuis mailing list
> > > > [hidden email]
> > > > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> > >
> > >
> > >
> > > _______________________________________________
> > > Cuis mailing list
> > > [hidden email]
> > > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> >
> >
> >
> > _______________________________________________
> > Cuis mailing list
> > [hidden email]
> > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Phil B
On Fri, 2015-08-14 at 12:42 -0400, Dan Norton wrote:

> On 13 Aug 2015 at 16:01, Phil (list) wrote:
>
> > On Thu, 2015-08-13 at 11:11 -0400, Dan Norton wrote:
> > > On 13 Aug 2015 at 2:29, Phil (list) wrote:
> > >
> > > > Dan,
> > > >
> > > >
> > > > On Wed, 2015-08-12 at 22:17 -0400, Dan Norton wrote:
> > > > > Hi Phil,
> > > > >
> > > > > On Windows 7 with Cuis loaded and idle, Windows Task Manager
> > >
> > > > Performance reports 0%
> > > > > CPU Usage. Memory Usage is 1.28 GB.
> > > > >
> > > >
> > > > What does the cpu usage show via World Menu -> Open... ->
> > Process
> > > > Browser for Morphic?
> > > >
> > >
> > > It shows 12%.
> > >
> > > > > With BouncingAtoms morphExtent: 500@450, stepTime 0, nAtoms
> > 5000
> > > > the report is 24 -
> > > > > 25% CPU Usage, 1.28 GB Memory Usage, 2 - 6 fps.
> > > > >
> > > >
> > > > OK, so it's not platform specific poor performance.  If you
> > close
> > > > the
> > > > BouncingAtomsMorph and wait for things to settle for a few
> > seconds,
> > > > what
> > > > does Process Browser show the Morphic cpu usage as??
> > > >
> > >
> > > It shows 40%. However, Win7 shows 1 - 2%. Using Process Browser to
> > measure absolute as
> > > opposed to relative CPU usage seems inaccurate to me. The
> > /difference/ in Process Browser
> > > numbers while atoms is running vs not running agree with Win7: 1 -
> > 2%.
> > >
> > > I don't like for something to try to measure its own performance
> > :-) - an independent
> > > instrument is preferable IMHO.
> >
> > True, the external monitoring tools will tend to give you a better
> > absolute picture as there may be some VM overhead (esp if plugins
> > are
> > involved) that Process Browser can't see.  However, CPU utilization
> > as
> > reported by the OS isn't terribly helpful unless you know how many
> > cores
> > the system has, was anything else active at the time, etc.
> > ProcessBrowser, while limited, avoids all that since it shows what
> > was
> > used vs what was available to it. (usually 100/<num cores> % of
> > total
> > system CPU)  Just seemed to make for a better apples to apples
> > comparison in this case to see if you are having the same issue
> > re:
> > Morphic chewing up cycles while otherwise 'idle'.
> >
>
> Rummaging around in my system reveals:
>
> Microsoft Windows 7 Home Premium
> 6.1.7601 Service Pack 1
>
> Intel(R) Core(TM) i3-2125 CPU @
> 3.30 GHz
>
> All Programs>Accessories>System Tools>Resource Monitor shows:
>
> an appalling (to me, at least) >170 threads "if the only tool you have is a hammer, every
> problem looks like a nail" sitting there quietly for the most part. Resource Monitor shows four
> "CPUs" with CPU 1 and CPU 3 parked. Total CPU usage < 1%.
>

So you've got a dual core processor with hyperthreading (4 logical
cores)...

> When Cuis is started, the Squeak.exe starts out with 17 threads, then eventually settles to 6
> threads. Total CPU usage < 1%.
>
> When BouncingAtoms is running, set up as above, CPU 1 and CPU 3 remain parked, CPU 0
> < 5%, and CPU 2 > 95%. Occasionally something (GC?) cranks CPU 0 to 85 - 90% briefly.
>
> When BouncingAtoms is stopped, all return to CPU 0 < 5%, CPU 2 <1%, CPU 1 and CPU 3
> parked.
>

Given your above processor info, divide the 10-14% (the idle usage
reported by Cuis) by 4 to get what you should roughly be seeing in
overall system CPU utilization (i.e. 2.5-3.5%, assuming not much else is
going on on the system)  Since the Squeak VM is single threaded for
Smalltalk code the most you should ever see when Cuis is fully busy is
~25% CPU utilization (i.e. 100% of a single core)

> So, the question is why should Cuis process browser report that Morphic UI is consuming 10
> - 14% ?
>

That is the question and it relates to why BouncingAtomsMorph is
performing so poorly in Cuis vs. Squeak.  Something is going on (even
when Cuis is 'idle')...

> > >  
> > > > > Cuis 4.2 2449, cogwin 15.22.3370
> > > > >
> > > > >  - Dan
> > > > >
> > > >
> > > > Thanks,
> > > > Phil
> > > >
> > > > > On 12 Aug 2015 at 17:44, Phil (list) wrote:
> > > > >
> > > > > > I should also mention that the Morph window is ~ 500x450
> > and
> > > > > > #stepTime
> > > > > > is set to 0 for anyone who wants to try to replicate...
> > > > > >
> > > > > > On Wed, 2015-08-12 at 17:36 -0400, Phil (list) wrote:
> > > > > > > I noticed a while back that something appeared to be going
> > on
> > > > with
> > > > > > Cuis
> > > > > > > drawing performance (at idle on my system Morphic
> > consumes
> > > > ~20% of
> > > > > > VM
> > > > > > > CPU *miniumum* according to ProcessBrowser) and this seems
> > to
> > > > give
> > > > > > an
> > > > > > > indication of what it's currently costing in drawing
> > > > > > performance...
> > > > > > >
> > > > > > > After seeing the Squeak 5.0 announcement, I was curious
> > to
> > > > see
> > > > > > roughly
> > > > > > > how much of a speed boost we might be able to expect
> > from
> > > > Spur
> > > > > > down the
> > > > > > > road.  So I decided to look at BouncingAtomsMorph to try
> > to
> > > > get a
> > > > > > rough
> > > > > > > apples-to-apples comparison and was quite surprised:
> > Spur
> > > > was
> > > > > > faster,
> > > > > > > but it was too much faster.  So I dropped back to Squeak
> > 4.5
> > > > and
> > > > > > it also
> > > > > > > performs much, much better than the Cuis version on the
> > same
> > > > VM.  
> > > > > > Here
> > > > > > > are the numbers I'm seeing using BouncingAtomsMorph with
> > > > roughly
> > > > > > > comparable (i.e. eyeballed) morph sizes and atom count
> > set
> > > > to
> > > > > > 5000:
> > > > > > > Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> > > > > > > Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> > > > > > > Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
> > > > > > >
> > > > > > > Granted BouncingAtomsMorph is not 100% identical from a
> > > > source
> > > > > > code
> > > > > > > standpoint but it's not nearly different enough where
> > I'd
> > > > expect
> > > > > > that
> > > > > > > sort of difference.  Is this a platform-specific issue
> > (I'm
> > > > on
> > > > > > Linux) or
> > > > > > > are others noticing drawing issues as well?
> > > > > >
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > Cuis mailing list
> > > > > > [hidden email]
> > > > > > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Cuis mailing list
> > > > > [hidden email]
> > > > > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Cuis mailing list
> > > > [hidden email]
> > > > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> > >
> > >
> > >
> > > _______________________________________________
> > > Cuis mailing list
> > > [hidden email]
> > > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> >
> >
> >
> > _______________________________________________
> > Cuis mailing list
> > [hidden email]
> > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Juan Vuletich-4
In reply to this post by Phil B
Hi Phil,

I won't spoil your fun, so instead of explaining the difference between
Squeak and Cuis here, I give you a suggestion: Use the profiler.

Cheers,
Juan Vuletich

On 8/12/2015 6:36 PM, Phil (list) wrote:

> I noticed a while back that something appeared to be going on with Cuis
> drawing performance (at idle on my system Morphic consumes ~20% of VM
> CPU *miniumum* according to ProcessBrowser) and this seems to give an
> indication of what it's currently costing in drawing performance...
>
> After seeing the Squeak 5.0 announcement, I was curious to see roughly
> how much of a speed boost we might be able to expect from Spur down the
> road.  So I decided to look at BouncingAtomsMorph to try to get a rough
> apples-to-apples comparison and was quite surprised: Spur was faster,
> but it was too much faster.  So I dropped back to Squeak 4.5 and it also
> performs much, much better than the Cuis version on the same VM.   Here
> are the numbers I'm seeing using BouncingAtomsMorph with roughly
> comparable (i.e. eyeballed) morph sizes and atom count set to 5000:
> Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
>
> Granted BouncingAtomsMorph is not 100% identical from a source code
> standpoint but it's not nearly different enough where I'd expect that
> sort of difference.  Is this a platform-specific issue (I'm on Linux) or
> are others noticing drawing issues as well?
>


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Juan Vuletich-4
In reply to this post by Dan Norton
The sum of percentages in the Cuis process browser is always 100%. What
it is measured is how the time spent by the interpreter is split amongst
Smalltalk processes.

Cheers,
Juan Vuletich

On 8/14/2015 1:42 PM, Dan Norton wrote:
> ...
> When BouncingAtoms is stopped, all return to CPU 0<  5%, CPU 2<1%, CPU 1 and CPU 3
> parked.
>
> So, the question is why should Cuis process browser report that Morphic UI is consuming 10
> - 14% ?


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Dan Norton
Ahh of course. Stared at it but didn't see it :-)

Thanks,
 - Dan

On 15 Aug 2015 at 10:27, Juan Vuletich wrote:

> The sum of percentages in the Cuis process browser is always 100%.
> What
> it is measured is how the time spent by the interpreter is split
> amongst
> Smalltalk processes.
>
> Cheers,
> Juan Vuletich
>
> On 8/14/2015 1:42 PM, Dan Norton wrote:
> > ...
> > When BouncingAtoms is stopped, all return to CPU 0<  5%, CPU 2<1%,
> CPU 1 and CPU 3
> > parked.
> >
> > So, the question is why should Cuis process browser report that
> Morphic UI is consuming 10
> > - 14% ?
>



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Phil B
In reply to this post by Juan Vuletich-4
On Sat, 2015-08-15 at 10:24 -0300, Juan Vuletich wrote:
> Hi Phil,
>
> I won't spoil your fun, so instead of explaining the difference between
> Squeak and Cuis here, I give you a suggestion: Use the profiler.
>

I will do that right... hey, where did the profiler option go in
ProcessBrowser?  Well, ok, I'll just do it manually with
#spyOnProcess:... grr!  I see it was taken out in 2409.  Now you're just
having fun with me...

> Cheers,
> Juan Vuletich
>
> On 8/12/2015 6:36 PM, Phil (list) wrote:
> > I noticed a while back that something appeared to be going on with Cuis
> > drawing performance (at idle on my system Morphic consumes ~20% of VM
> > CPU *miniumum* according to ProcessBrowser) and this seems to give an
> > indication of what it's currently costing in drawing performance...
> >
> > After seeing the Squeak 5.0 announcement, I was curious to see roughly
> > how much of a speed boost we might be able to expect from Spur down the
> > road.  So I decided to look at BouncingAtomsMorph to try to get a rough
> > apples-to-apples comparison and was quite surprised: Spur was faster,
> > but it was too much faster.  So I dropped back to Squeak 4.5 and it also
> > performs much, much better than the Cuis version on the same VM.   Here
> > are the numbers I'm seeing using BouncingAtomsMorph with roughly
> > comparable (i.e. eyeballed) morph sizes and atom count set to 5000:
> > Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> > Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> > Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
> >
> > Granted BouncingAtomsMorph is not 100% identical from a source code
> > standpoint but it's not nearly different enough where I'd expect that
> > sort of difference.  Is this a platform-specific issue (I'm on Linux) or
> > are others noticing drawing issues as well?
> >
>



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Juan Vuletich-4
On 8/15/2015 4:40 PM, Phil (list) wrote:

> On Sat, 2015-08-15 at 10:24 -0300, Juan Vuletich wrote:
>> Hi Phil,
>>
>> I won't spoil your fun, so instead of explaining the difference between
>> Squeak and Cuis here, I give you a suggestion: Use the profiler.
>>
> I will do that right... hey, where did the profiler option go in
> ProcessBrowser?  Well, ok, I'll just do it manually with
> #spyOnProcess:... grr!  I see it was taken out in 2409.  Now you're just
> having fun with me...
>

Swear not. Use any of the class methods in the profiler:
AndreasSystemProfiler. For example, something like

     AndreasSystemProfiler spyForMilliseconds: 200

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Phil B
In reply to this post by Juan Vuletich-4
On Sat, 2015-08-15 at 10:24 -0300, Juan Vuletich wrote:
> Hi Phil,
>
> I won't spoil your fun, so instead of explaining the difference between
> Squeak and Cuis here, I give you a suggestion: Use the profiler.
>

Given your comment it sounds like it's by design...

OK, so I reverted to an older build to get back the process-based
profiler and I can see that Cuis is doing a lot more drawing (work) than
Squeak. (duh!) Unfortunately, Cuis/Squeak doesn't provide a lot of
tooling to tell me what that work actually is.  What I think I see going
on is that Squeak is using the old region-based damage system while Cuis
appears to just be bit-blitting the entire frame each time? (I'll hold
off jumping up and down for joy until I get confirmation... if that's
what's going on, that is FANTASTIC!)

> Cheers,
> Juan Vuletich
>
> On 8/12/2015 6:36 PM, Phil (list) wrote:
> > I noticed a while back that something appeared to be going on with Cuis
> > drawing performance (at idle on my system Morphic consumes ~20% of VM
> > CPU *miniumum* according to ProcessBrowser) and this seems to give an
> > indication of what it's currently costing in drawing performance...
> >
> > After seeing the Squeak 5.0 announcement, I was curious to see roughly
> > how much of a speed boost we might be able to expect from Spur down the
> > road.  So I decided to look at BouncingAtomsMorph to try to get a rough
> > apples-to-apples comparison and was quite surprised: Spur was faster,
> > but it was too much faster.  So I dropped back to Squeak 4.5 and it also
> > performs much, much better than the Cuis version on the same VM.   Here
> > are the numbers I'm seeing using BouncingAtomsMorph with roughly
> > comparable (i.e. eyeballed) morph sizes and atom count set to 5000:
> > Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> > Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> > Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
> >
> > Granted BouncingAtomsMorph is not 100% identical from a source code
> > standpoint but it's not nearly different enough where I'd expect that
> > sort of difference.  Is this a platform-specific issue (I'm on Linux) or
> > are others noticing drawing issues as well?
> >
>



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Phil B
In reply to this post by Juan Vuletich-4
On Sat, 2015-08-15 at 17:56 -0300, Juan Vuletich wrote:

> On 8/15/2015 4:40 PM, Phil (list) wrote:
> > On Sat, 2015-08-15 at 10:24 -0300, Juan Vuletich wrote:
> >> Hi Phil,
> >>
> >> I won't spoil your fun, so instead of explaining the difference between
> >> Squeak and Cuis here, I give you a suggestion: Use the profiler.
> >>
> > I will do that right... hey, where did the profiler option go in
> > ProcessBrowser?  Well, ok, I'll just do it manually with
> > #spyOnProcess:... grr!  I see it was taken out in 2409.  Now you're just
> > having fun with me...
> >
>
> Swear not. Use any of the class methods in the profiler:
> AndreasSystemProfiler. For example, something like
>
>      AndreasSystemProfiler spyForMilliseconds: 200
>

segfault (stack overflow)...

> Cheers,
> Juan Vuletich



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Juan Vuletich-4
On 8/15/2015 6:07 PM, Phil (list) wrote:
>
>> Swear not. Use any of the class methods in the profiler:
>> AndreasSystemProfiler. For example, something like
>>
>>       AndreasSystemProfiler spyForMilliseconds: 200
>>
> segfault (stack overflow)...
>

Use Cog 3370 or older. I reported the problem in VM-Dev, but nobody
listened.

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Juan Vuletich-4
In reply to this post by Phil B
On 8/15/2015 5:58 PM, Phil (list) wrote:

> On Sat, 2015-08-15 at 10:24 -0300, Juan Vuletich wrote:
>> Hi Phil,
>>
>> I won't spoil your fun, so instead of explaining the difference between
>> Squeak and Cuis here, I give you a suggestion: Use the profiler.
>>
> Given your comment it sounds like it's by design...
>
> OK, so I reverted to an older build to get back the process-based
> profiler and I can see that Cuis is doing a lot more drawing (work) than
> Squeak. (duh!) Unfortunately, Cuis/Squeak doesn't provide a lot of
> tooling to tell me what that work actually is.  What I think I see going
> on is that Squeak is using the old region-based damage system while Cuis
> appears to just be bit-blitting the entire frame each time? (I'll hold
> off jumping up and down for joy until I get confirmation... if that's
> what's going on, that is FANTASTIC!)
>

C'mon! Isn't it obvious in the profiler tree that the problem is using
local coordinates and transforming them on each draw?

It is possible to optimize it back. It just requires some work.

Cheers,
Juan Vuletich

>> Cheers,
>> Juan Vuletich
>>
>> On 8/12/2015 6:36 PM, Phil (list) wrote:
>>> I noticed a while back that something appeared to be going on with Cuis
>>> drawing performance (at idle on my system Morphic consumes ~20% of VM
>>> CPU *miniumum* according to ProcessBrowser) and this seems to give an
>>> indication of what it's currently costing in drawing performance...
>>>
>>> After seeing the Squeak 5.0 announcement, I was curious to see roughly
>>> how much of a speed boost we might be able to expect from Spur down the
>>> road.  So I decided to look at BouncingAtomsMorph to try to get a rough
>>> apples-to-apples comparison and was quite surprised: Spur was faster,
>>> but it was too much faster.  So I dropped back to Squeak 4.5 and it also
>>> performs much, much better than the Cuis version on the same VM.   Here
>>> are the numbers I'm seeing using BouncingAtomsMorph with roughly
>>> comparable (i.e. eyeballed) morph sizes and atom count set to 5000:
>>> Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
>>> Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
>>> Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
>>>
>>> Granted BouncingAtomsMorph is not 100% identical from a source code
>>> standpoint but it's not nearly different enough where I'd expect that
>>> sort of difference.  Is this a platform-specific issue (I'm on Linux) or
>>> are others noticing drawing issues as well?
>>>
>
>


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Phil B
On Sat, 2015-08-15 at 18:41 -0300, Juan Vuletich wrote:

> On 8/15/2015 5:58 PM, Phil (list) wrote:
> > On Sat, 2015-08-15 at 10:24 -0300, Juan Vuletich wrote:
> >> Hi Phil,
> >>
> >> I won't spoil your fun, so instead of explaining the difference between
> >> Squeak and Cuis here, I give you a suggestion: Use the profiler.
> >>
> > Given your comment it sounds like it's by design...
> >
> > OK, so I reverted to an older build to get back the process-based
> > profiler and I can see that Cuis is doing a lot more drawing (work) than
> > Squeak. (duh!) Unfortunately, Cuis/Squeak doesn't provide a lot of
> > tooling to tell me what that work actually is.  What I think I see going
> > on is that Squeak is using the old region-based damage system while Cuis
> > appears to just be bit-blitting the entire frame each time? (I'll hold
> > off jumping up and down for joy until I get confirmation... if that's
> > what's going on, that is FANTASTIC!)
> >
>
> C'mon! Isn't it obvious in the profiler tree that the problem is using
> local coordinates and transforming them on each draw?
>

In the old profiler output (I went back to 2404 to get it), it didn't
jump out at me (the bounds related calls only appear to be <10% of the
time)  It could just be that I'm more dense than usual :-)

I can definitely see how that could cause a problem doing 1000s of local
to global conversions per frame...

> It is possible to optimize it back. It just requires some work.
>

Fair enough... but I still think that things are generally off
performance-wise with Morphic... (it might just be that we've got a
bunch of fairly unoptimized code similar to what's going on with
BouncingAtomsMorph that will take some time to work through, but things
are definitely feeling slow-ish from a UI standpoint)

> Cheers,
> Juan Vuletich
>
> >> Cheers,
> >> Juan Vuletich
> >>
> >> On 8/12/2015 6:36 PM, Phil (list) wrote:
> >>> I noticed a while back that something appeared to be going on with Cuis
> >>> drawing performance (at idle on my system Morphic consumes ~20% of VM
> >>> CPU *miniumum* according to ProcessBrowser) and this seems to give an
> >>> indication of what it's currently costing in drawing performance...
> >>>
> >>> After seeing the Squeak 5.0 announcement, I was curious to see roughly
> >>> how much of a speed boost we might be able to expect from Spur down the
> >>> road.  So I decided to look at BouncingAtomsMorph to try to get a rough
> >>> apples-to-apples comparison and was quite surprised: Spur was faster,
> >>> but it was too much faster.  So I dropped back to Squeak 4.5 and it also
> >>> performs much, much better than the Cuis version on the same VM.   Here
> >>> are the numbers I'm seeing using BouncingAtomsMorph with roughly
> >>> comparable (i.e. eyeballed) morph sizes and atom count set to 5000:
> >>> Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> >>> Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> >>> Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
> >>>
> >>> Granted BouncingAtomsMorph is not 100% identical from a source code
> >>> standpoint but it's not nearly different enough where I'd expect that
> >>> sort of difference.  Is this a platform-specific issue (I'm on Linux) or
> >>> are others noticing drawing issues as well?
> >>>
> >
> >
>



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Curious drawing performance issue

Phil B
On Sat, 2015-08-15 at 22:55 -0400, Phil (list) wrote:

> On Sat, 2015-08-15 at 18:41 -0300, Juan Vuletich wrote:
> > On 8/15/2015 5:58 PM, Phil (list) wrote:
> > > On Sat, 2015-08-15 at 10:24 -0300, Juan Vuletich wrote:
> > >> Hi Phil,
> > >>
> > >> I won't spoil your fun, so instead of explaining the difference between
> > >> Squeak and Cuis here, I give you a suggestion: Use the profiler.
> > >>
> > > Given your comment it sounds like it's by design...
> > >
> > > OK, so I reverted to an older build to get back the process-based
> > > profiler and I can see that Cuis is doing a lot more drawing (work) than
> > > Squeak. (duh!) Unfortunately, Cuis/Squeak doesn't provide a lot of
> > > tooling to tell me what that work actually is.  What I think I see going
> > > on is that Squeak is using the old region-based damage system while Cuis
> > > appears to just be bit-blitting the entire frame each time? (I'll hold
> > > off jumping up and down for joy until I get confirmation... if that's
> > > what's going on, that is FANTASTIC!)
> > >
> >
> > C'mon! Isn't it obvious in the profiler tree that the problem is using
> > local coordinates and transforming them on each draw?
> >
>
> In the old profiler output (I went back to 2404 to get it), it didn't
> jump out at me (the bounds related calls only appear to be <10% of the
> time)  It could just be that I'm more dense than usual :-)
>

'More dense than usual' it is:  I forgot to ratchet up the atom count
when I got profiling going.  *Then* the local/global conversions start
to dominate.  (The only reason I cranked them up that high originally
was to get some FPS distance between the Cog and Spur Squeak runs.  At
lower atom counts where drawing dominates, Cuis is still significantly
slower than Squeak running on Cog)

> I can definitely see how that could cause a problem doing 1000s of local
> to global conversions per frame...
>
> > It is possible to optimize it back. It just requires some work.
> >
>
> Fair enough... but I still think that things are generally off
> performance-wise with Morphic... (it might just be that we've got a
> bunch of fairly unoptimized code similar to what's going on with
> BouncingAtomsMorph that will take some time to work through, but things
> are definitely feeling slow-ish from a UI standpoint)
>
> > Cheers,
> > Juan Vuletich
> >
> > >> Cheers,
> > >> Juan Vuletich
> > >>
> > >> On 8/12/2015 6:36 PM, Phil (list) wrote:
> > >>> I noticed a while back that something appeared to be going on with Cuis
> > >>> drawing performance (at idle on my system Morphic consumes ~20% of VM
> > >>> CPU *miniumum* according to ProcessBrowser) and this seems to give an
> > >>> indication of what it's currently costing in drawing performance...
> > >>>
> > >>> After seeing the Squeak 5.0 announcement, I was curious to see roughly
> > >>> how much of a speed boost we might be able to expect from Spur down the
> > >>> road.  So I decided to look at BouncingAtomsMorph to try to get a rough
> > >>> apples-to-apples comparison and was quite surprised: Spur was faster,
> > >>> but it was too much faster.  So I dropped back to Squeak 4.5 and it also
> > >>> performs much, much better than the Cuis version on the same VM.   Here
> > >>> are the numbers I'm seeing using BouncingAtomsMorph with roughly
> > >>> comparable (i.e. eyeballed) morph sizes and atom count set to 5000:
> > >>> Squeak 5.0 (Spur VM from all-in-one download): 29-31 fps
> > >>> Squeak 4.5 (Cog VM 15.25.3390): 24-26 fps
> > >>> Cuis 2440 (Cog VM 15.25.3390): 6-8 fps
> > >>>
> > >>> Granted BouncingAtomsMorph is not 100% identical from a source code
> > >>> standpoint but it's not nearly different enough where I'd expect that
> > >>> sort of difference.  Is this a platform-specific issue (I'm on Linux) or
> > >>> are others noticing drawing issues as well?
> > >>>
> > >
> > >
> >
>



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org