A troubleshooting tips list or a more collaborative effort to make it better?

I must say that IDEA remains true to its tagline -- Develop with Pleasure. Even a simple feature like spell checker is neatly implemented. Kudos to developers.

One somewhat annoying problem I have seen is not getting back in business (of coding) once you get into troubles. You have to resort to time consuming techniques like invalidating caches or worse even, deleting the compiler cache from caches folder etc. The advice on the web is often conflicting and you end up not using this great IDE to its full potential. And it never rains, it pours. Once you start getting troubles, the best choice is to take a walk or (more) caffeine :-).

If I am asking for a panacea, that would be foolish. IDE gets exposed to various situations and it may not always be possible to come up with any set of golden rules to get you out of troubles, but a systematic approach to solve the issues has to yield better results. Or better yet, if I can contribute some scripts that configure the IDE to its better use on a given platform, it would be nice. Wouldn't it?

Before I begin, is something "reliable" already available, in the form of a Wiki document somewhere? Or should we start creating one? We (users of IDEA) are all going to rely heavily on the IDEA developers to guide us here.

For example, a simple workflow like below might be helpful, when the trouble strikes:

    1. Always work on the latest release of IDEA. That is supposed to be the most stable. Should you consider RC build of a next release more stable than a given release?
    2. Be concerned about the memory it uses. Depending upon the number of "Editor Windows" open at a given point in time, what is the optimum heap memory choices? Look at the default idea.vmoptions. I use -Xms1g, -Xmx2g (I have Quadcore Linux desktop) because I have several windows open at the same time. This varies from situation to situation and from platform to platform.
    3. Be critical of plugins you use. If you don't use a plugin, disable it. To this effect, do we have something like a "user defined profile"? Again, this may not be always possible, but it might be a good starting point (and cheap to actually use). I am not sure if IDEA actually does something like: Please turn on plugin xxxx if you want to do this .... But starting small may be a good idea. So, I usually have minimal number of plugins I have enabled. Is the "Template Project Structure" something I should explore?
    4. Analyze log pattens in $HOME/.IntelliJIdea90/logs/log-files. This usually contains long stack traces. So, is there anything that IDEA developers can suggest us to look for, and correct?
    5. Be concerned about the JDK that you use. Lot of things change when JDK you used changes. Change the JDK less often.
    6. Invalidate the caches (File -> Invalidate Caches) and restart the IDE when it is just a "bad day". Then, you'll start seeing red unresolved symbols for something like java.lang.String even when you think and see that you have configured the JDK correctly or for one of the library classes that you use in your humangous Maven project. This means that another restart is required. Maybe IDEA should allow reindexing of specific packages (e.g. java.*, com.apache.*) without restarting? Usually, after a couple of restarts I am back in business.


Anything else that fellow users do?

2 comments

> I use -Xms1g, -Xmx2g

I guess sometimes IDEA hangs for a long period, am I right?

with small Xmx -> garbage collector periodically sweeps away dead objects
with large Xmx -> dead objects are accumulated and then gc has a lot of work to do at one time and IDEA hangs

0

Please sign in to leave a comment.