Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[rap-dev] Fwd: RAP big heap dump

Hi Folks,

Markus Kohler (http://kohlerm.blogspot.com/) was kind enough to take a more in depth look at a heap dump of our demo application with 1000+ active users. It is interesting to note that we only consumed around 500 MB of memory, which is less than 500 KB per user session. 


Here are his findings:


WidgetAdapter

More than 60 Mbyte are consumed in
 org.eclipse.swt.internal.widgets.WidgetAdapter contains a lots of empty Hashmaps and duplicated Strings in the  field id.

 

URLImageDescriptor
org.eclipse.jface.resource.URLImageDescriptor 18 Mbyte
thin wrapper around java.net.URL.
Lots of URL’s are duplicated (URL does anyway consume a lot of memory)


Duplicate Classes
Query: Java Basics -> Duplicate Classes
741 Classes are there 2 times.
Could save some perm space.

ArrayList
Histogram select ArrayList
Java Collections -> collections_grouped_by_size 
Length| # Objects | Shallow Heap | Retained Heap
------------------------------------------------
0     |   159.777 |    3.834.648 | >= 11.798.008
1     |   483.321 |   11.599.704 | >= 32.258.552
2     |   196.968 |    4.727.232 | >= 18.674.728


Lot’s of empty ArrayLists
Immediate Dominators on the first line:

Class name                                              | Objects | Dom. Objects | Shallow Heap | Dom. Shallow Heap
------------------------------------------------------------------------------------------------------------------
org.eclipse.ui.internal.menus.WorkbenchMenuService      |   1.038 |       28.384 |       58.128 |           681.216
org.eclipse.rwt.internal.events.EventAdapter$ListenerSet|  22.194 |       22.194 |      355.104 |           532.656
org.eclipse.ui.internal.menus.SlaveMenuService          |   5.966 |       11.932 |      190.912 |           286.368
------------------------------------------------------------------------------------------------------------------


Lot’s of ArrayLists with one entry

Immediate dominators

Class name                                              | Objects | Dom. Objects | Shallow Heap | Dom. Shallow Heap
------------------------------------------------------------------------------------------------------------------
org.eclipse.rwt.internal.events.EventAdapter$ListenerSet| 338.923 |      338.923 |    5.422.768 |         8.134.152
org.eclipse.swt.internal.widgets.UntypedEventAdapter    |  27.991 |       27.991 |      447.856 |           671.784
org.eclipse.core.internal.expressions.WithExpression    |  22.836 |       22.836 |      730.752 |           548.064
------------------------------------------------------------------------------------------------------------------


So it seems org.eclipse.rwt.internal.events.EventAdapter$ListenerSet would be a good candidate for optimization.
Whether to store single entry or a collection can be decided at runtime (a not statically type safe hack)

Regards,
Markus




A big Thank you to Markus!

Jochen

Back to the top