gzz-dev
[Top][All Lists]
Advanced

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

Re: [Gzz] View2D enhancing.


From: Tuomas Lukka
Subject: Re: [Gzz] View2D enhancing.
Date: Tue, 8 Jul 2003 17:34:37 +0300
User-agent: Mutt/1.5.4i

On Tue, Jul 08, 2003 at 01:08:40PM +0300, Matti Katila wrote:
> 
> On Tue, 8 Jul 2003, Tuomas Lukka wrote:
> > On Tue, Jul 08, 2003 at 01:19:02AM +0300, Matti Katila wrote:
> > > I run into problems with View2D. I would like to make it use faster way 
> > > to change scene i.e., through setParams. As you already know we have more 
> > > than one main node with FenPDF. I have made a simple interface to change 
> > > scene's parameters but it doesn't work because no one keeps track of all 
> > > possible coordinate systems since recursive view2ds can be just one 
> > > instance in the whole view. 
> > > 
> > > So can we add a new parameter to View2D?
> > > 
> > >     public abstract void render(VobScene vs, 
> > > -         Object plane,
> > > +         Object plane, Object key,
> > >           int matchingParent,
> > >               int box2screen, int box2plane
> > >                   );
> > > 
> > > 
> > > With this change and simple helper class:
> > 
> > Umm, I'm not at all in the clear about what you're trying to achieve
> > and how.
> 
> View2D is one big instance and it renders all viewports shown in screen, 
> main nodes and buoys currently. Dragging of main node can be made fast 
> because we can save the coordsys number in the main node instance.
> We can't use fast dragging(using the same vobscene and changing coordsys 
> parameters) with: moving notes, selecting area because they are a part of 
> View2D chain instance and saving the coordsys number there is ridiculous 
> in the current View2D chain layer as I noticed it. So if we want speed - 
> we need to save that coordsystem to somewhere.

I still don't understand how the ``key`` parameter would help.

Please be 10x more explicit and clear than usual, because I'm in holiday mode.

Why not just use matchingparent and the View2D's known internal structure?

> > > /** Very simple util to save integer in map.
> > >  */
> > > public class CoordsysCache {
> > >     private Map coords = new WeakHashMap(10);
> > >     public void set(Object key, int cs) {
> > >   coords.put(key, new Integer(cs));
> > >     }
> > >     
> > >     public int get(Object key) {
> > >   return ((Integer)coords.get(key)).intValue();
> > >     }
> > > }
> > > 
> > > 
> > > We could use setParams easily and make things faster.
> > 
> > This is very bad on Kaffe and possibly others, creating lots of
> > Integer objects for the GC to worry about.
> 
> Other possibility is to create a new View2D chain instance for every 
> viewport.

... which is not a particularly nice option.

        Tuomas




reply via email to

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