• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Memory Usage Optimization

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)?
 
reply
    Bookmark Topic Watch Topic
  • New Topic