Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Memory Usage Optimization

 
Manu Ramakrishnan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
My application involves building spanning trees. It takes one minute to create trees from 3 MB data. But it takes close to 1.5 hours to create tree for 15 MB data. Is is taking this long because it takes a while to allocate space during new operation? I thought the algorithm is straight forward and I don't see any performance tuning in the algorithm.
I need convincing answers of time taken is because of new object creation only.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34084
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two things I can think of that can be the problem (neither of which is object creation)

1) Algorithm - Are you using an algorithm that gets exponentially worse for large data? If so, can you tune it?
2) Memory - Are all 15 megs of data in memory at once? If so, there is a lot of paging going on. You would need to do some sort of tuning of the algorithm to reduce the paging.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd bet that it's a problem of the algorithm.

Can you explain what it is doing (and how)?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic