Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Java "OutofMemory" problem
Java "OutofMemory" problem [message #227836] Tue, 12 December 2006 09:14 Go to next message
Eclipse UserFriend
Originally posted by: keyanema.rediffmail.com

Hi,

I am drawing a graph using the GEF and draw2d components. The whole
mechanism works as follows:

1. The user specifies a text file containing some information required to
draw the graph.

2. I have a parser which parses the file and creates data objects [ models
] and associate the information from the file with each data objects. [
Every data object is unique ]

3. After parsing of the file is complete I open an editor which is of type
"GraphicalEditor" and each data object is associated with an editPart to
be drawn.

The graph is some what like a Gantt chart.

The editor does not support editing of the models. Only Zoom in and Zoom
out functions are supported. The figures drawn on the graph are also not
subjected to be moved. They are fixed at the location except for the few
functionalities associated with the entire tool.

And the problem is:

When I am opening a small file [ containing less information ] the tool
works perfectly fine. But as the size of the file increases or when the
data objects increase and the area occupied by the whole graph starts
increasing JVM goes out of memory due to too many data objects and
corresponding figures to be drawn.

I am supposed to handle substantially larger files and in the current
framework I am observing JVM OutofMemory when trying to render the graph.

Please, help me here providing your suggesstions and opinions about the
problem. Some efficient way to do the whole procedure.

Thanks & Regards,
Keya
Re: Java "OutofMemory" problem [message #227850 is a reply to message #227836] Tue, 12 December 2006 13:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

You can run Eclispe with -Xmx1024 or other larger memory to give you more memory when it's running (or by putting it in eclipse.ini). What is the size of the memory footprint when it's started, and on which machine?

Alex.
Re: Java "OutofMemory" problem [message #227858 is a reply to message #227850] Tue, 12 December 2006 13:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: keyanema.rediffmail.com

Hey,

I am running Eclipse on an x86-32 bit machine. I try allocating more
memory [128M+] and it works fine then. But as I continue the testing with
the larger files that much memory also seems to be getting exhausted. I
have 1G memory on my machine but the graph is needed to be rendered on
the machines with lesser memory than mine. So increasing the memory won't
solve the problem permanently.

I might be required to draw the graph efficiently some how.

Please provide your suggesstion on this.

Thanks & Regards,
Keya
Re: Java "OutofMemory" problem [message #227866 is a reply to message #227858] Tue, 12 December 2006 14:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: keyanema.rediffmail.com

Hi

I will also like to mention that when my tool tries to load a large data
set the CPU usage reaches 100%. This is observed after allocating huge
memory to the JVM also. And the amount of time to load a large data set
is in minutes which is clearly not a good sign. Does this indicate some
improper way while rendering the graph?

Regards,
Keya
Re: Java "OutofMemory" problem [message #227873 is a reply to message #227866] Tue, 12 December 2006 16:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

It might be dependent on how you're processing the files. Try putting some debug statements, with times, at key stages of your application and see what's going on.

128m seems like a really small amount of memory; any complex program needs a minimum of 256m, more like 512m these days.

Alex.
Re: Java "OutofMemory" problem [message #227881 is a reply to message #227873] Tue, 12 December 2006 17:05 Go to previous message
Eclipse UserFriend
Originally posted by: keyanema.rediffmail.com

Hi Alex,

Debugging the application shows that the parsing of the file doesn't take
time as well as that much amount of memory. I have tested with 256M of
memory too and the result is same.

Here is another observation, I have 2 views in the tool. One is the
Outline View and the other which is almost similar to the Outline View for
the graph with slightly different functionalities involved. Basically
both are TreeViewers. It seems that loading the graph [ drawing the graph
] is not taking as much time and memory but when the views are populated
the CPU usage goes 100% and the maximum delay is observed. I will be able
to continue my study for the views by tomorrow only and then I will put in
more observations for this.

What are your suggesstions regarding this ?

Thanks & Regards,
Keya
Previous Topic:painting Figure
Next Topic:the problem of ZoomIn or ZoomOut button display in coolbar when open a editor.
Goto Forum:
  


Current Time: Wed Dec 08 10:34:22 GMT 2021

Powered by FUDForum. Page generated in 0.02046 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top