[platform-dev] Re: Performance issue with OutlineView

  • From: Frédéric Deniger < >
  • To:
  • Subject: [platform-dev] Re: Performance issue with OutlineView
  • Date: Thu, 22 Nov 2012 12:08:32 +0100

It seems that the problem comes from test.outlineviewexample.TradeNode.createSheet():


You use reflection to retrieve values which is a long task:

@Override
    protected Sheet createSheet() {
        Sheet sheet = Sheet.createDefault();
        Sheet.Set properties = Sheet.createPropertiesSet();
        final Trade trade = getLookup().lookup(Trade.class);

        for (final Method method : Trade.class.getMethods()) {
            if (method.isAnnotationPresent(PropertyDescriptor.class)) {
                PropertyDescriptor propertyDescriptor = method.getAnnotation(PropertyDescriptor.class);
                Property property =
                        new PropertySupport.ReadOnly(
                        propertyDescriptor.propertyName(),
                        method.getReturnType(),
                        propertyDescriptor.displayName(), null) {
                            @Override
                            public Object getValue() throws IllegalAccessException, InvocationTargetException {
                                return method.invoke(trade);
                            }
                        };
                properties.put(property);
            }
        }
        sheet.put(properties);
        return sheet;
    }

I believe it's better to use "faster" PropertySupport like PropertySupport.ReadWrite or to cache some values if you use reflection.


2012/11/22 imavroukakis < " target="_blank"> >

Geertjan Wielenga wrote:
> On 11/22/2012 11:03 AM, imavroukakis wrote:
>
> > No joy I fear..I've attached a short video displaying the behaviour.
> >
> > Attachments:
> > http://forums.netbeans.org//files/nb_186.zip
> >
> >
> Yes, that's what I see too. But that's a lot better than what I saw when
> I first ran your code.
>
> Are you sure you need to load all your data at the same time? Ever heard
> of pagination?
>
> Gj


Not an option unfortunately, and 600 entries is really not that much for outline to be suffering so. I also notice a direct inverse relation  between the number of property columns visible and the responsiveness of the UI, i.e. the more property columns displayed, the less responsive the UI is.
I'm doing some profiling now with YourKit I'll post here again if I have anything conclusive







[platform-dev] Re: Re: Performance issue with OutlineView

(continued)

[platform-dev] Re: Re: Performance issue with OutlineView

Geertjan Wielenga 11/21/2012

[platform-dev] Re: Performance issue with OutlineView

imavroukakis 11/21/2012

[platform-dev] Re: Re: Performance issue with OutlineView

Geertjan Wielenga 11/21/2012

[platform-dev] Re: Performance issue with OutlineView

imavroukakis 11/21/2012

[platform-dev] Re: Re: Performance issue with OutlineView

Geertjan Wielenga 11/21/2012

[platform-dev] Re: Performance issue with OutlineView

Ioannis Mavroukakis 11/21/2012

[platform-dev] Re: Performance issue with OutlineView

imavroukakis 11/22/2012

[platform-dev] Re: Re: Performance issue with OutlineView

Geertjan Wielenga 11/22/2012

[platform-dev] Re: Re: Performance issue with OutlineView

Geertjan Wielenga 11/22/2012

[platform-dev] Re: Performance issue with OutlineView

imavroukakis 11/22/2012

[platform-dev] Re: Performance issue with OutlineView

Frédéric Deniger 11/22/2012

[platform-dev] Re: Performance issue with OutlineView

Frédéric Deniger 11/22/2012

[platform-dev] Re: Performance issue with OutlineView

imavroukakis 11/22/2012

[platform-dev] Re: Performance issue with OutlineView

imavroukakis 11/22/2012

[platform-dev] Re: Performance issue with OutlineView

frederic.deniger 11/22/2012

[platform-dev] Re: Performance issue with OutlineView

Johannes Boesl 11/22/2012

[platform-dev] Re: Performance issue with OutlineView

frederic.deniger 11/23/2012

[platform-dev] Re: Re: Performance issue with OutlineView

Frédéric Deniger 11/23/2012

[platform-dev] Re: Re: Performance issue with OutlineView

Johannes Boesl 11/23/2012

[platform-dev] Re: Re: Performance issue with OutlineView

Frédéric Deniger 11/23/2012

[platform-dev] Re: Re: Performance issue with OutlineView

Frédéric Deniger 11/23/2012

Project Features

Project Links

About this Project

Platform was started in November 2009, is owned by Antonin Nebuzelsky, and has 138 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close