aspose file tools*
The moose likes Performance and the fly likes Memory Usage Optimization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Memory Usage Optimization" Watch "Memory Usage Optimization" New topic
Author

Memory Usage Optimization

Manu Ramakrishnan
Greenhorn

Joined: Jun 07, 2003
Posts: 10
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
134

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I'd bet that it's a problem of the algorithm.

Can you explain what it is doing (and how)?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Memory Usage Optimization
 
Similar Threads
Singleton pattern and thread issue
Java Casting issue
how to convert a bunch of string into a file array and then upload it ?
Lots of .nfs files being created
Copying Multiple Files Over A Socket