error setting not saved across sessions

Hi,
I've been trying to turn off one of the code analysis options without success. From the settings dialogue, Errors selection, under Probable bugs, select Unused assignment. On the right, "Report redundant initializers". I have unchecked this but it appears that each time I restart Idea it's back on. Most of our code explicitly initializes variables at the top of each class so this causes an enormous number of yellow warning lines on the right. I'm not interested in this detection but can't seem to turn it off for longer than the current session. Any ideas? The code analysis is nice but unless I turn off most of it Idea goes memory crazy every time I switch from one source file to another and pretty much kills my machine. Maybe it's OK for small class files but it kills me on large ones. Am I missing something here and changing this incorrectly or is this a bug?
Thanks for any input,
Scott

15 comments

http://www.jetbrains.net/jira/browse/IDEADEV-4554

(It's marked as fixed, but look at the comments -
Anna Kozlova is working on it.)

0

Hello Scott,

What build do you use?
Thanks.

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Hi,

I've been trying to turn off one of the code analysis options without
success. From the settings dialogue, Errors selection, under Probable
bugs, select Unused assignment. On the right, "Report redundant
initializers". I have unchecked this but it appears that each time I
restart Idea it's back on. Most of our code explicitly initializes
variables at the top of each class so this causes an enormous number
of yellow warning lines on the right. I'm not interested in this
detection but can't seem to turn it off for longer than the current
session. Any ideas? The code analysis is nice but unless I turn off
most of it Idea goes memory crazy every time I switch from one source
file to another and pretty much kills my machine. Maybe it's OK for
small class files but it kills me on large ones. Am I missing
something here and changing this incorrectly or is this a bug?

Thanks for any input,

Scott



0

Huh? Is there a published build that has this bug fixed?
I reported it as still occurring in 5162 which is the latest
build available...

0

Hello Stephen,

No, I am afraid that it is about 5.1 ;(

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Huh? Is there a published build that has this bug fixed?
I reported it as still occurring in 5162 which is the latest
build available...



0

Anna Kozlova wrote:
> No, I am afraid that it is about 5.1 ;(

Err, right, seems I am too much of an EAP junkie.
I faintly remember Irida...

0

Hi Anna, should this be fixed in 5175?
Because it still occurs...

0

I'm running 5.1 build 4155, to my knowledge, the latest non-EAP release. Does anyone know if it's just this one setting or a problem for many settings? Is there some way to completely turn off the analysis feature - at least the constant analysis behind the scenes until and unless I explicitly ask for an analysis? The code analysis, on the surface, seems like a great feature - maybe it's just me but the tradeoff seems to be outrageously poor performance. My project is around 800 source files - some quite large - largest is around 25000 lines of code. For me - that's not an unusually large project. But, the code analysis absolutely kills me switching between source files - it's not unusual for me to have to sit back and wait for a couple of minutes once Idea has started on a file - I just watch the mem meter go up to 256M/GC/256M/GC - my machine is completely locked to this until Idea's done. And if I have two CVS branches open at once as two projects Idea very quickly becomes, IMHO, unusable - it simply eats memory. I'll have to shut it down many times per day just to get mem back but then, at least this one analysis setting is lost so the whole cycle starts again. It would be much better for me to be able to shut off as much background processing as possible and let me ask for a code analysis (like when I'm going to get a cup of coffee) when I want one. That would, it seems to me, give me MUCH better edit time performance and let me choose when it's convenient for me to analyze the code. I'm running a Dell Latitude 1.5G laptop with 1G mem - I give Idea 256M on startup. Anyway, thanks for the reply and for any other info.

Scott

0

The project I mostly work on these day has about 3500 source files currently. And often I have another project open which would probably be around another 2000 files. Both of which I would definitely not consider large projects and IDEA works perfectly fine with those.
However 25000 lines of code in a single file, seems absolutely outrageous to me. I don't think I have a single file larger then 3000 lines. If you want to work with a file that size you will probably need to click on Hector the Inspector (the little man in the status bar) and switch the highlighting level to none.

Bas

0

OK, well, you get much better performance than I do - when I have two projects open at the same time (ie. two CVS branches of the code) Idea eats an enormous amount of memory and keeps it. This kind of memory behavior has been reported many, many times out here - over many version of Idea. Open a second project, watch the memory jump - close the second project - hmmmm, memory didn't drop as expected - particularly in conjunction with CVS. You're right - the file I mentioned is big - but all of the various methods are, essentially, web services triggered by SOAP messages. Sure, they could be broken up into classes - but that's several hundred additional classes without much source benefit. It's clean in a single source file, every other editor I use handles it with ease, it compiles quickly and is a core component to a very large application server with excellent runtime performance. So, I'm not going to change our source approach to make an IDE happy. What I want is to turn off all this constant background processing - I have no need for constant analysis of the code - personally I think it's counter-productive when you're actually typing code and the constant freezes are really annoying. I don't think it's too much to expect that an editor be able to keep up with typing. I would much prefer to get code edited in a consistently FAST editor - one that keeps up with me. Then, as I'm going through unit test/compile cycles, have the ability to say, OK, now analyze the code - I'll go grab a coffee and come back and see the results and clean up anything I think is necessary. Go ahead and build memory structures that let me navigate through the code easily as necessary - no problem with that. But as all of these various analysis options have been added, Idea's runtime performance has dramatically decreased. I'm not saying I don't want the analysis capability - many of the checks are very helpful - it's an important tool I don't want to sacrifice. I just don't need or want real-time analysis. After all these years, 90+ percent of my time is still CVS/edit/compile/debug - those basic features, for me, simply have to be fast - if not then the IDE is getting in my way and hampering productivity. For me, sacrificing performance in what I do 90% of the time in exchange for information I really only need once in a while is not worth it. I was just hoping there was a way I could set up the analysis features I want, have NONE of it done real-time, then let me trigger a code analysis when I want it. If there's a way to do that I would really appreciate any info.
Thanks,
Scott

0

Scott Johnson wrote:

I was just hoping there was a way I could set
up the analysis features I want, have NONE of it done real-time, then
let me trigger a code analysis when I want it. If there's a way to
do that I would really appreciate any info.


Did you try switching of analysis via Hector the Inspector in the status
bar like I suggested? Is that not enough to increase performance?

Bas

0

Hello Stephen,

Could you please provide me some tips to reproduce? I do not see it now ...

Thank you

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Hi Anna, should this be fixed in 5175?
Because it still occurs...



0

yeah, but I'm not sure that's what I'm looking for. I guess it does turn off the analysis - at first glance the wording made me think it simply turned off the highlighting, not the analysis. So, I guess this helps on well known large files. Unfortunately I don't really see much value in Hector - looks like you have to set it on a file-by-file basis - that's pretty impractical - unless I'm reading that dialoge incorrectly. I'll make do, I guess, as I have no choice other than to reevaluate what I can do with Eclipse. Personally I don't like Eclipse but I've just gotten to the point where I can't deal with Idea's constant freeze ups - there's nothing worse than waiting on your IDE when you're up against a deadline - my IDE is supposed to be waiting on me! Do you know if the setting in Hector sticks with the file permanently or do I have to reset it every time I edit the file. Also I guess what I'm hearing is there's no way to systematically shut off background analysis completely and trigger an analysis when I want it? I saw that in the CVS commit dialoge you can choose to do an analysis pre-commit - odd time to think about checking your code - I would think you'd want to do that pre-commit. But with the background analysis I'm not sure what the point of that option is - ie. if it's always analyzing, why would you need to redo it at commit time? Again, unless I misunderstand. Guess the only real way to do it is just uncheck all error message analysis options in settings and just do without. Again, hate to do that but for me an IDE has got to absolutely nail the basics before the advanced features mean much. Fast, responsive editing, to my mind, is the most basic. Without it the enviornment becomes a pain to work in and the other features aren't relevant. Thanks for your input - I appreciate it.
Scott

0

Anna Kozlova wrote:

Could you please provide me some tips to reproduce? I do not see it now ...

Hello Anna,
try a fresh install. You'll notice even some more bugs.
By default the inspection is enabled with the option to ignore immediately returned values switched off.
However the inspection never fires.
When I change the option it is still not remembered, but on restart at least it fires.

Here's what I did. Would be nice if you could get rid of this bug, finally:

  • unzipped idea5175.zip to C:\idea-5175

  • changed idea.properties:

idea.config.path=C:/idea-5175/config
idea.system.path=C:/idea-5175/system
idea.plugins.path=C:/idea-5175/config/plugins

  • started idea using idea.bat, did not import any settings, accepted the license, used the eap license key

  • configured jdk 1.5.0_06

  • created a new project (all settings left at default)

  • Created a class Main in the default package:

public class Main {
public static int foo() {
int i = 42;
return i;
}
}

  • No warning in sight - the inspection does not trigger.

  • Opened the inspection setting (and filed IDEA-6982).

  • The inspection is enabled, both inspections are off (did not change anything).

So the inspection should really give a warning.

  • Closed idea, restarted

  • The inspection now gives a warning for "int i = 42;"

  • Opened the settings again, switched the option to ignore immedately returned values pn.

  • Warning is gone.

  • Restarted Idea.

  • Warning is there again, options is again off.


BTW: In the original request, I gave pretty much the same, detailed steps:
http://www.jetbrains.net/jira/browse/IDEADEV-2746

0


Scott Johnson wrote:

Do you know if the setting in Hector
sticks with the file permanently or do I have to reset it every time
I edit the file.


The setting is saved.

Also I guess what I'm hearing is there's no way to
systematically shut off background analysis completely and trigger an
analysis when I want it?


Of course you can just switch off all inspections and run the inspector
manually when needed (via Analyze > Inspect Code). Or have a couple of
inspection profiles and switch between them with "quick switch" (View >
Quick Switch Scheme).

I saw that in the CVS commit dialoge you can
choose to do an analysis pre-commit - odd time to think about
checking your code - I would think you'd want to do that pre-commit.


I'm don't understand what you mean here. The analysis done before commit
and if it fails the commit is canceled. Did you expect something different?

But with the background analysis I'm not sure what the point of that
option is - ie. if it's always analyzing, why would you need to redo
it at commit time?


The editor highlighting only highlights the visible editor. Any warnings
in other changed files might go unnoticed until commit time.

Bas

0

Thanks for the reply and the info. Yes, I know about the profiles. You say, however, that I can turn off all inspections then do it manually when I want via the Analyze menu. That's excatly what I want to know. So far the only way I can see to turn off all inspections is to go the the Settings/Errors dialog and uncheck everything. OK, fine. But if I then manually say analyze the code, what inspections would be used - none, right? Or again, am I missing something. I guess what I was hoping for is the ability to set all the inspections I'm interested in - just turn off the background processing. Then, when I do manually choose to analyze via. the analyze menu, those inspections I've chosen will be applied. So, I guess what you're saying is, create 1 profile with the inspections I want - another, with none. Have the "none" profile active when I'm developing then switch profiles and do the manual analysis? Is the correct? If so, it gets me what I want and will work. I was just hoping turning off the background processing was simple - ie. a simple checkbox. The technology behind these capabilities is great, don't get me wrong. But, I think you have to very careful cramming too much required processing into a client-side java application. Java's getting better, but it's still a LONG way from delivering the kind of client-side performance that a native app will deliver - I don't think anyone who works with Idea, Eclipse or NetBeans would argue too much with that. So, when you're going to put a ton of background processing in, I think it makes sence to think about that in terms of the kind of machine the average developer is likely to be using and make it easy to turn some of that stuff off for performance reasons.
Thanks,
Scott

0

Please sign in to leave a comment.