gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz] Re: Coordsystem benchmarks


From: Tuomas Lukka
Subject: [Gzz] Re: Coordsystem benchmarks
Date: Wed, 19 Mar 2003 10:08:31 +0200
User-agent: Mutt/1.4i

On Wed, Mar 19, 2003 at 07:29:05AM +0200, Matti Katila wrote:
> 
> Hi,
> 
> Todays benchmarks about measuring cs creations without showing any vobs 
> was not very good test with timeRender().
> 
> Something like here:
>  
>   for count in range(0, self.count):
>      cs = vs.coords.affineCoordsys(0,0,0,0 ,1,0,0,1)
>      for nested in range(0,self.nested):
>          cs = vs.coords.affineCoordsys(cs,0,0,0, 1,0,0,1)
> 
> ....
> 
> and make the measuring with System.currentTimeMillis():
> 
> time = System.currentTimeMillis()
> for i in range(0,1000):
>     vs = w.createVobScene()
>     self.scene(vs)
> print 'time: ', (System.currentTimeMillis() - time)
> 
> 
> Is better than timeRender which doesn't show difference at all or what do 
> you, Tuomas, think?

Matti: no, this is *not* better. What *is* better is the COMBINATION
of the timeRender() code and

> time = System.currentTimeMillis()
> for i in range(0,1000):
>     vs = w.createVobScene()
> print 'time: ', (System.currentTimeMillis() - time)

i.e. measure the vobscene generation time and the rendering time SEPARATELY.

With your code, the measurement doesn't help at all: you can't say *where*
the bottleneck is. With the two codes, you run them and can see that "oh,
creating coordsyses in jython is slow", which OTOH may not be terribly novel...

> With coords_benchmark demo I saw that creating coordsystems takes linear 
> time and affineCoordsys is twice as expensive as translateCS. 

Yes, because they spend time converting the parameters in jython.

Because the view are Java, you should make the inner loop Java anyway.

        Tuomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]