Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT slowing doing after a couple of hour
SWT slowing doing after a couple of hour [message #450498] Mon, 14 February 2005 14:41 Go to next message
Eclipse UserFriend
Originally posted by: lennart.petersson.gmail.com

Hi!

Having a SWT 3.0.1 application running on Linux/GTK.

Everything is fast and snappy at start. Slowly degrading performance.
Example: using jprofiler to profile CPU usage shows that a simple call to
composite.layout() takes 143 ms when application newly started and two
hours later this same operation takes 6750 ms.

Memory is ok. JVM has heap set to min 128 mb and max 256 mb. Starts at
about 42 mb used and after two hours this is about 44 mb.

Any idea of where to start looking?

Thanks,

/L
Re: SWT slowing doing after a couple of hour [message #450499 is a reply to message #450498] Mon, 14 February 2005 15:50 Go to previous messageGo to next message
Charlie Surface is currently offline Charlie SurfaceFriend
Messages: 40
Registered: July 2009
Member
You may be running low on graphics or image resources. You should take
a look at Sleak, which is an SWT performance monitor. Just search the
web for its location on the eclipse.org site.

Charlie


Lennart Petersson wrote:

> Hi!
>
> Having a SWT 3.0.1 application running on Linux/GTK.
>
> Everything is fast and snappy at start. Slowly degrading performance.
> Example: using jprofiler to profile CPU usage shows that a simple call
> to composite.layout() takes 143 ms when application newly started and
> two hours later this same operation takes 6750 ms.
>
> Memory is ok. JVM has heap set to min 128 mb and max 256 mb. Starts at
> about 42 mb used and after two hours this is about 44 mb.
>
> Any idea of where to start looking?
>
> Thanks,
>
> /L
>
Re: SWT slowing doing after a couple of hour [message #450503 is a reply to message #450498] Mon, 14 February 2005 16:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

Lennart Petersson wrote:
> Hi!
>
> Having a SWT 3.0.1 application running on Linux/GTK.
>
> Everything is fast and snappy at start. Slowly degrading performance.
> Example: using jprofiler to profile CPU usage shows that a simple call
> to composite.layout() takes 143 ms when application newly started and
> two hours later this same operation takes 6750 ms.
>
> Memory is ok. JVM has heap set to min 128 mb and max 256 mb. Starts at
> about 42 mb used and after two hours this is about 44 mb.
>

Are you referring to memory used by the JVM, or memory allocated to
objects by the JVM here?


> Any idea of where to start looking?
>
> Thanks,
>
> /L
>
Re: SWT slowing doing after a couple of hour [message #450507 is a reply to message #450498] Mon, 14 February 2005 16:55 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
This is really interesting. Are you using JFace or is it really only SWT?
If only SWT, try the latest SWT from HEAD to see if the problem is fixed.
The call to Composite.layout() might indicate something. Does the composite
in question have tons of children (perhaps ones that you have hidden rather
than disposed?). That would account for layout getting slow.

"Lennart Petersson" <lennart.petersson@gmail.com> wrote in message
news:cuqdb5$pal$1@www.eclipse.org...
> Hi!
>
> Having a SWT 3.0.1 application running on Linux/GTK.
>
> Everything is fast and snappy at start. Slowly degrading performance.
> Example: using jprofiler to profile CPU usage shows that a simple call to
> composite.layout() takes 143 ms when application newly started and two
> hours later this same operation takes 6750 ms.
>
> Memory is ok. JVM has heap set to min 128 mb and max 256 mb. Starts at
> about 42 mb used and after two hours this is about 44 mb.
>
> Any idea of where to start looking?
>
> Thanks,
>
> /L
>
Re: SWT slowing doing after a couple of hour [message #450576 is a reply to message #450507] Tue, 15 February 2005 15:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lennart.petersson.gmail.com

Well... what could I say :)

Nothing more than it wasn't me that coded it (but I could have had a more
deep look into the code before calling for help :)

Nowhere i could find a single little dispose(), even though a lot of
composites was created and recreated during time...

It behaves a lot better now, still degrading some but not like before.

/L
Steve Northover wrote:

> This is really interesting. Are you using JFace or is it really only SWT?
> If only SWT, try the latest SWT from HEAD to see if the problem is fixed.
> The call to Composite.layout() might indicate something. Does the composite
> in question have tons of children (perhaps ones that you have hidden rather
> than disposed?). That would account for layout getting slow.

> "Lennart Petersson" <lennart.petersson@gmail.com> wrote in message
> news:cuqdb5$pal$1@www.eclipse.org...
>> Hi!
>>
>> Having a SWT 3.0.1 application running on Linux/GTK.
>>
>> Everything is fast and snappy at start. Slowly degrading performance.
>> Example: using jprofiler to profile CPU usage shows that a simple call to
>> composite.layout() takes 143 ms when application newly started and two
>> hours later this same operation takes 6750 ms.
>>
>> Memory is ok. JVM has heap set to min 128 mb and max 256 mb. Starts at
>> about 42 mb used and after two hours this is about 44 mb.
>>
>> Any idea of where to start looking?
>>
>> Thanks,
>>
>> /L
>>
Re: SWT slowing doing after a couple of hour [message #450641 is a reply to message #450576] Wed, 16 February 2005 13:56 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Sorry, just to be clear, were tons of hidden children being created and that
was the problem? If not, I'd like to keep looking.
Also, no dispose() anywhere? ... YIKES ... sounds like graphics resources
are leaking.

"Lennart Petersson" <lennart.petersson@gmail.com> wrote in message
news:cut3mm$etq$1@www.eclipse.org...
> Well... what could I say :)
>
> Nothing more than it wasn't me that coded it (but I could have had a more
> deep look into the code before calling for help :)
>
> Nowhere i could find a single little dispose(), even though a lot of
> composites was created and recreated during time...
>
> It behaves a lot better now, still degrading some but not like before.
>
> /L
> Steve Northover wrote:
>
> > This is really interesting. Are you using JFace or is it really only
SWT?
> > If only SWT, try the latest SWT from HEAD to see if the problem is
fixed.
> > The call to Composite.layout() might indicate something. Does the
composite
> > in question have tons of children (perhaps ones that you have hidden
rather
> > than disposed?). That would account for layout getting slow.
>
> > "Lennart Petersson" <lennart.petersson@gmail.com> wrote in message
> > news:cuqdb5$pal$1@www.eclipse.org...
> >> Hi!
> >>
> >> Having a SWT 3.0.1 application running on Linux/GTK.
> >>
> >> Everything is fast and snappy at start. Slowly degrading performance.
> >> Example: using jprofiler to profile CPU usage shows that a simple call
to
> >> composite.layout() takes 143 ms when application newly started and two
> >> hours later this same operation takes 6750 ms.
> >>
> >> Memory is ok. JVM has heap set to min 128 mb and max 256 mb. Starts at
> >> about 42 mb used and after two hours this is about 44 mb.
> >>
> >> Any idea of where to start looking?
> >>
> >> Thanks,
> >>
> >> /L
> >>
>
>
Re: SWT slowing doing after a couple of hour [message #450898 is a reply to message #450641] Sun, 20 February 2005 14:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lennart.petersson.gmail.com

Please do give this a bit more of thinking... since the problem isn't
completly gone. It takes a bit longer time before going slow but it will
be there :(

Well... there were some disposes... all graphics seemed to be handled
rather well. Using Sleak I could only find one Font not disposed and that
was fixed when I found the UI where it was created and I added a dispose
of the UI when we where finished with it.

The main problem in the app is that a lots of UI that normally would be
shown like within a dialog is rather displayed in a specific area of the
main UI. Most often those UI aren't reused but only set to NULL and a new
one instanciated next time it is needed. Due to short of time I haven't
investigate why they are not reused (there are some comments in code
indicating that it didn't work...) and instead i added a dispose of the UI
before setting it to NULL. This made the app to behave a bit better,
slowing done was delayed some hours but sooner or later it was soooo slow
again.

Question: Just an example of stuff happening in the app: Main UI has a
table where tableitems are added, removed, cleared during the app's
lifetime. Should each tableitem be disposed when they are not used
anymore? Today this is not done and I guess that it sould be done, or?

To have a closer look at the app in question you can find it on
www.sf.net/projects/redpos and to see a specific UI that is being
reinstanciated several times look at
http://cvs.sourceforge.net/viewcvs.py/redpos/RedPOS/src/org/ redpos/client/ui/plugin/function/FindProductUI.java?rev=1.5& amp;view=auto


Any ideas on what to look for to solve my performance problem!?

Thanks,
/L

Steve Northover wrote:

> Sorry, just to be clear, were tons of hidden children being created and that
> was the problem? If not, I'd like to keep looking.
> Also, no dispose() anywhere? ... YIKES ... sounds like graphics resources
> are leaking.

> "Lennart Petersson" <lennart.petersson@gmail.com> wrote in message
> news:cut3mm$etq$1@www.eclipse.org...
>> Well... what could I say :)
>>
>> Nothing more than it wasn't me that coded it (but I could have had a more
>> deep look into the code before calling for help :)
>>
>> Nowhere i could find a single little dispose(), even though a lot of
>> composites was created and recreated during time...
>>
>> It behaves a lot better now, still degrading some but not like before.
>>
>> /L
>> Steve Northover wrote:
>>
>> > This is really interesting. Are you using JFace or is it really only
> SWT?
>> > If only SWT, try the latest SWT from HEAD to see if the problem is
> fixed.
>> > The call to Composite.layout() might indicate something. Does the
> composite
>> > in question have tons of children (perhaps ones that you have hidden
> rather
>> > than disposed?). That would account for layout getting slow.
>>
>> > "Lennart Petersson" <lennart.petersson@gmail.com> wrote in message
>> > news:cuqdb5$pal$1@www.eclipse.org...
>> >> Hi!
>> >>
>> >> Having a SWT 3.0.1 application running on Linux/GTK.
>> >>
>> >> Everything is fast and snappy at start. Slowly degrading performance.
>> >> Example: using jprofiler to profile CPU usage shows that a simple call
> to
>> >> composite.layout() takes 143 ms when application newly started and two
>> >> hours later this same operation takes 6750 ms.
>> >>
>> >> Memory is ok. JVM has heap set to min 128 mb and max 256 mb. Starts at
>> >> about 42 mb used and after two hours this is about 44 mb.
>> >>
>> >> Any idea of where to start looking?
>> >>
>> >> Thanks,
>> >>
>> >> /L
>> >>
>>
>>
Re: SWT slowing doing after a couple of hour [message #451065 is a reply to message #450898] Tue, 22 February 2005 14:06 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
How many table items do you have? When you dispose the table, the items are
automatically disposed. I would concentrate on Composite.layout() because
this is getting slower for you over time. How many children does the
composite have when you start? How many after it gets slow?

"Lennart Petersson" <lennart.petersson@gmail.com> wrote in message
news:cva719$a8u$1@www.eclipse.org...
> Please do give this a bit more of thinking... since the problem isn't
> completly gone. It takes a bit longer time before going slow but it will
> be there :(
>
> Well... there were some disposes... all graphics seemed to be handled
> rather well. Using Sleak I could only find one Font not disposed and that
> was fixed when I found the UI where it was created and I added a dispose
> of the UI when we where finished with it.
>
> The main problem in the app is that a lots of UI that normally would be
> shown like within a dialog is rather displayed in a specific area of the
> main UI. Most often those UI aren't reused but only set to NULL and a new
> one instanciated next time it is needed. Due to short of time I haven't
> investigate why they are not reused (there are some comments in code
> indicating that it didn't work...) and instead i added a dispose of the UI
> before setting it to NULL. This made the app to behave a bit better,
> slowing done was delayed some hours but sooner or later it was soooo slow
> again.
>
> Question: Just an example of stuff happening in the app: Main UI has a
> table where tableitems are added, removed, cleared during the app's
> lifetime. Should each tableitem be disposed when they are not used
> anymore? Today this is not done and I guess that it sould be done, or?
>
> To have a closer look at the app in question you can find it on
> www.sf.net/projects/redpos and to see a specific UI that is being
> reinstanciated several times look at
>
http://cvs.sourceforge.net/viewcvs.py/redpos/RedPOS/src/org/ redpos/client/ui/plugin/function/FindProductUI.java?rev=1.5& amp;view=auto
>
>
> Any ideas on what to look for to solve my performance problem!?
>
> Thanks,
> /L
>
> Steve Northover wrote:
>
> > Sorry, just to be clear, were tons of hidden children being created and
that
> > was the problem? If not, I'd like to keep looking.
> > Also, no dispose() anywhere? ... YIKES ... sounds like graphics
resources
> > are leaking.
>
> > "Lennart Petersson" <lennart.petersson@gmail.com> wrote in message
> > news:cut3mm$etq$1@www.eclipse.org...
> >> Well... what could I say :)
> >>
> >> Nothing more than it wasn't me that coded it (but I could have had a
more
> >> deep look into the code before calling for help :)
> >>
> >> Nowhere i could find a single little dispose(), even though a lot of
> >> composites was created and recreated during time...
> >>
> >> It behaves a lot better now, still degrading some but not like before.
> >>
> >> /L
> >> Steve Northover wrote:
> >>
> >> > This is really interesting. Are you using JFace or is it really only
> > SWT?
> >> > If only SWT, try the latest SWT from HEAD to see if the problem is
> > fixed.
> >> > The call to Composite.layout() might indicate something. Does the
> > composite
> >> > in question have tons of children (perhaps ones that you have hidden
> > rather
> >> > than disposed?). That would account for layout getting slow.
> >>
> >> > "Lennart Petersson" <lennart.petersson@gmail.com> wrote in message
> >> > news:cuqdb5$pal$1@www.eclipse.org...
> >> >> Hi!
> >> >>
> >> >> Having a SWT 3.0.1 application running on Linux/GTK.
> >> >>
> >> >> Everything is fast and snappy at start. Slowly degrading
performance.
> >> >> Example: using jprofiler to profile CPU usage shows that a simple
call
> > to
> >> >> composite.layout() takes 143 ms when application newly started and
two
> >> >> hours later this same operation takes 6750 ms.
> >> >>
> >> >> Memory is ok. JVM has heap set to min 128 mb and max 256 mb. Starts
at
> >> >> about 42 mb used and after two hours this is about 44 mb.
> >> >>
> >> >> Any idea of where to start looking?
> >> >>
> >> >> Thanks,
> >> >>
> >> >> /L
> >> >>
> >>
> >>
>
>
Previous Topic:FileDialog as Save As dialog
Next Topic:Image inside push button
Goto Forum:
  


Current Time: Fri Apr 26 12:58:44 GMT 2024

Powered by FUDForum. Page generated in 0.05304 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top