History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-12859
Type: Performance Problem Performance Problem
Status: Open Open
Priority: Normal Normal
Assignee: Olesya Smirnova
Reporter: Vladislav Kaznacheev
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

IDEA hangs on reformatting large rpoject

Created: 15 Nov 06 18:00   Updated: 07 Nov 08 23:36
Component/s: Code Formatting and Code Style
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Java Archive File settings.jar (32 kb)

Issue Links:
Duplicate
 
This issue is duplicated by:
IDEA-15765 IDEA hangs when large codebase is ref... Resolved

Build: 69,094


 Description  « Hide
From Anthony Holland:

I still find that when I try to reformat the entire source of the JRE, as copied out of src.jar, IntelliJ doens't handle. It got to 100% really quickly, much more quickly than ever before (though I also have a better machine now). But once it got to 100% the progress box went grey (you can see where it was) and the entire frame stopped painting (you can see where I dragged the Task Manager across the window).

I reformatted with the "Optimize Imports" option on, and with the attached settings (settings.jar). I had to force IntelliJ to close from the task manager after about 5 minutes of non-responsiveness. Now that I have restarted it again, it appears that the much or possibly all of the code has not in fact been reformatted.

If thinkg that if there is an upper limit on the number of files or lines that can be successfully reformatted by IDEA then it should start by counting the lines and reporting if there is going to be a problem.



 All   Comments   Work Log   Change History      Sort Order:
Irina Petrovskaya - 20 Nov 06 12:21
with the default vm options the reformatting ends with out of memory error in ~10 minutes even for 'java' package of jdk sources.
The attempt to reformat this package by its subpackages processing one-by-one works perfectly.
With changed vmoptions (i've tried
-Xms128m
-Xmx1024m
-XX:MaxPermSize=128m )
the java package is processed normally, but for the whole project i had to kill idea after ~1 hour.

Anthony Holland - 16 Oct 07 18:13
Note: a key poroblem for the user is that even if (s)he is aware of the bug, when looking at a very large codebase it is not immediately obvious how many files are under each node in the tree, nor how "deep" to go in trying to divide the tree up into reformattable chunks. The result is that either the user must investigate carefully, or guess, but if guesses are taken there is a good chance that IDEA will freeze, which means killing it from the task manager and restarting it. This is quite frustrating.

Anthony Holland - 16 Oct 07 18:45
I'm not sure why this has been open for so long, but in the interests of getting it fixed I'm going to give exact instructions for getting a "problem project" up quickly.

Using Sun JDK 1.5.0_11, installed in (for example) C:\Program Files\Java\jdk1.5.0_11:
(1) Create project directory e.g C:\workspace\JREs\1.50_11

(2) Create a "src" directory under that directory, and copy the contents of the src.zip file in the jdk directory into that directory

(3) Create a "lib" directory as a sibling or src. Go to C:\Program Files\Java\jdk1.5.0_11\jre\lib and do a search for all .jar files in that directory and subdirectories. Copy them all to the newly created lib directory. This list must include rt.jar.

(4) You will need to delete two packages from the src tree because they don't compile. These are
com.sun.org.apache and
com.sun.corba.se

(5) Create a "classes" directory as a sibling to "src" at "lib" for output.

(6) In IDEA, make sure that the exact same version of the JDK is available and set up as a JDK, i.e. 1.5.0_11 in this example. Create a new project "from existing sources" in the project directory.

(7) under compiler settings, set the heap size to 1024.

(8) try compiling. It should work fine.

(9) Now try reformatting. Observe the problem. To see the problem manisfest in a less dire fashion, pic a directory that is merely large, e.g. the org package at the top level. This keeps my machine busy for about 4 minutes before completing successfully.


Anthony Holland - 01 Aug 08 14:17
How is this one going? Any fix in sight?

Anthony Holland - 07 Nov 08 23:36
With IntelliJ 8.0 build#9013 and JDK 1.6.0_10 I can now reformat the entire javax.swing directory in 10 minutes, which is an improvement as I've never seen this succeeed before. However, for most of that time the GUI is frozen.