Refactor the Core project
Project: | JNode Core |
Component: | Code |
Category: | task |
Priority: | normal |
Assigned: | Unassigned |
Status: | closed |
Jump to:
The JNode Core project is close to being too big to compile under Eclipse on 32-bit Linux.
I normally run eclipse with -Xmx1500. Today I had to add org.apache.log4j to the Core build sources, and found started having eclipse fail with OOM exceptions. I pushed eclipse to -Xmx1900 and had the same problem. Winding back to -Xmx1800, the build worked ... with lots of long GC pauses.
The most likely cause is that there is too much code in the Core project. We need to refactor it so that it takes less memory to compile. Of the top of my head, the Sun development tools could potentially be moved to a separate tools project, the CORBA support code to the Net project and the AWT and/or Swing code to the GUI project.
I don't know if this would create problems; e.g. when incorporating source updates from upstream. Perhaps Levente can comment on this and other issues, and maybe think of some alternatives if refactoring is not practical.
- Login to post comments
#1
Are you sure it's only the size of the core project and not the size of the whole codebase that is causing the problems to you?
Putting the core class library in various projects doesn't look like a good idea to me.
I'm thinking about moving the class library code out of core to a new subproject. But that might not be a solution for you.
Did you find a workaround already? Compiling JNode in Eclipse doesn't look very useful to me anyway.
#2
Addressing your points in order ...
Perhaps I should be thinking about using a different IDE ...
#3
This got worse for me last week and for a few hours I was unable to build at all within Eclipse. However, I've found a temporary workaround that allows me to build.
The default Eclipse compiler settings give something like 30K to 40K warnings. If change the settings to change all conditions that are currently "Warning" to "Ignore", the build completes without running out of memory.
#4
I have a problem too running on 64bit.
In all/lib/jnode.xml the default memoryMaximumSize of 768MB is not enough. I have it localy set to 1524 to build JNode.
#5
Levente's extraction of the JDK classes into a classlib has resolved this issue. Marking as fixed.
#7
Closed manually