Performance issues with ArrayList on RCP client using WebSphere [message #1699657] |
Thu, 25 June 2015 15:16 |
Mick Miralas Messages: 13 Registered: June 2015 |
Junior Member |
|
|
Hi,
I have some Java experience, but I'm new to RCP and I need some help for a performance issue I am faced with right now.
A WebSphere Application Server gets some data from a DB and creates an object (class Part containing fields like serialNr, name and timestamp) for each data set, which is then put into an ArrayList and finally returned to the RCP client application in JSON format.
The client uses JACKSON for deserialization and also creates an ArrayList of Part objects:
ObjectMapper objectMapper = new ObjectMapper();
try {
partsList = objectMapper
.readValue(client
.target("http://xyz.de:9080/test/test/part/find?partnr=J*")
.request(MediaType.APPLICATION_JSON)
.get(String.class),
new TypeReference<List<Part2>>() {});
System.out.println(partsList.size());
} catch (JsonParseException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (JsonMappingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Issues:
At the beginning I used the SWT table widget and for lots of data sets there were serious performance issues, i.e. high memory consumption and long time until the content of the table appeared.
Then I found the virtual table thing on the vogella website (sorry, I have less than 5 posts, so I can't post any links), but there was no improvement. Obviously, the updateElement() method is never called and I don't know why.
Furthermore, I've set a breakpoint and saw that the ArrayList creation takes most of time and resources, i.e. the table is not the culprit.
Questions:
-Is there a better way than creating an ArrayList of objects?
-Concerning the example from the vogella website: Does this work for ArrayLists?
-Any other ideas?
Thank you very much!
Regards,
Mick
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02529 seconds