Idea is picking up all directories from where the project file is stored

And it processes and caches these directories (including exploded, etc) even though they are not defined in any module.

eg structure:

/Project
/Project/project.ipr
/Project/exploded/...
/Project/somethingelse/..
/Project/module1/...
/Projfect/module2/...

it's picking up those exploded and somethingelse directories for some reason which makes Idea painfully slow and the searches like ctrl-n are finding things in those directories too.

25 comments
Comment actions Permalink

Yes, I noticed it too. It started happening couple of EAP builds ago


"Travis Reeder" <treeder@gmail.com> wrote in message
news:26012996.1185316646565.JavaMail.itn@is.intellij.net...

And it processes and caches these directories (including exploded, etc)
even though they are not defined in any module.

>

eg structure:

>

/Project
/Project/project.ipr
/Project/exploded/...
/Project/somethingelse/..
/Project/module1/...
/Projfect/module2/...

>

it's picking up those exploded and somethingelse directories for some
reason which makes Idea painfully slow and the searches like ctrl-n are
finding things in those directories too.



0
Comment actions Permalink

Hello Travis,

We decided to leave only files from project base dir.

Thank you

-


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

And it processes and caches these directories (including exploded,
etc) even though they are not defined in any module.

eg structure:

/Project
/Project/project.ipr
/Project/exploded/...
/Project/somethingelse/..
/Project/module1/...
/Projfect/module2/...
it's picking up those exploded and somethingelse directories for some
reason which makes Idea painfully slow and the searches like ctrl-n
are finding things in those directories too.



0
Comment actions Permalink

Anna,

What build has this change?
Why even include the files in the project base by default?

Thanks,
Jon

0
Comment actions Permalink

We decided to leave only files from project base dir.

What does this mean? Leave them for what? Puzzled...

Also, I usually have my Idea files (*.iml, *.ipr) in a directory "idea" beneath my project root.
Now will that mean the "project base dir" in your sense is "myproject/idea"?

0
Comment actions Permalink

Hello,

Next EAP I hope.

I beleive that if you want to create multimodule project and store files
like readme.txt you may be puzzled where to put them ...

Thank you

-


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

Anna,

What build has this change?
Why even include the files in the project base by default?
Thanks,
Jon



0
Comment actions Permalink

Hello,

Leave them to be able to browse them somehow

Yes, project base dir is a directory which contains .ipr file (Relative paths
are calculated from this folder)

Thank you

-


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

>> We decided to leave only files from project base dir.
>>

What does this mean? Leave them for what? Puzzled...

Also, I usually have my Idea files (*.iml, *.ipr) in a directory
"idea" beneath my project root. Now will that mean the "project base
dir" in your sense is "myproject/idea"?



0
Comment actions Permalink

Ah, I see, thanks for the answer.

Wouldn't it be a better approach to be able to configure a "project root" for each project?!

That way I could store my idea files in a sub-folder "myproject/idea", but still have "myproject" visible in the project tree.

Also you could make a configurable list of subfolder to exclude...

Oh well, I think I can just as well go on and create a dummy module just to be able to set its content root to the project root. It's just confusing for Idea beginners.

0
Comment actions Permalink

I've also had to create a dummy module for my project root since my IDEA project file is a couple of subdirectories in and all my other modules are rooted in the middle of package hierarchies (to split modules by packages while source is in a single root). It works well enough I suppose.

0
Comment actions Permalink


We decided to leave only files from project base dir.

Anna, what do you mean by this exactly? Am I seeing the expected behavior or is what I am seeing a bug?

0
Comment actions Permalink

Travis - I think what she means is that the current behavior you are seeing was introduced recently but will change in the next EAP so that only file and not subdirectories of the project root will be included. The recent change has both being included.
Jon

0
Comment actions Permalink

Hello,

Exactly.

Thank you

-


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

Travis - I think what she means is that the current behavior you are
seeing was introduced recently but will change in the next EAP so that
only file and not subdirectories of the project root will be included.
The recent change has both being included.

Jon



0
Comment actions Permalink

I still don't think IDEA forcing non-module files to be part of the project is a good, um, idea. Even if you restrict it to files only.

If I need to have files like "readme.txt" as part of the project, I can simply create a "top" module inside the project, and set its content root to be the same as the project root. Then any files that are not part of other modules will fall into this top-level module.


project_dir/ <-- project root, and also the content root for the "top" module
|
|- module1/ < content root for module1
|
|- module2/ < content root for module2
|
|- readme.txt < this file ends up under "top" module


Try it, works just fine. You can even name it something like "_top" if you want it to always sort above other modules.

Alternatively, what are the favorites for? If you have an occasional file that is outside of any module roots, but still want to edit it from time to time, you can just add it to the favorites instead of making a whole top level module for it.

Basically, in one form or another, this functionality has always been present for those that needed it, but now you are forcing it on everyone, no matter if they need it or not. The project view becomes cluttered with no way to turn it off, not to mention the performance hit of IDEA scanning all those file for changes or when doing full-text searches across the whole project (this is the exact problem I'm having with my current project structure).

It doesn't look like this feature was really thought through. For instance, what exactly is the semantics of these files? You can't use the standard module options to mark any of them as excluded, or as source roots, etc, because there is no such GUI associated with the project container. The project container should only contain modules, not random files. Or are you planing to grow the project container into a more module-like entity, with all the associated functionality?

0
Comment actions Permalink

Ivan,

Me and many others have begged for years to get this feature, so please
stop fighting against it! :)

If it doesn't match your needs then make suggestions on how to improve
it. But don't force us back into the dark medieval times when we had to
create a full blown Java module just to edit a single Ant build file.

Ivan Todoroski wrote:

I still don't think IDEA forcing non-module files to be part of the project is a good, um, idea. Even if you restrict it to files only.

If I need to have files like "readme.txt" as part of the project, I can simply create a "top" module inside the project, and set its content root to be the same as the project root. Then any files that are not part of other modules will fall into this top-level module.


project_dir/ <-- project root, and also the content root for the "top" module
|
|- module1/ < content root for module1
|
|- module2/ < content root for module2
|
|- readme.txt < this file ends up under "top" module


Try it, works just fine. You can even name it something like "_top" if you want it to always sort above other modules.

Alternatively, what are the favorites for? If you have an occasional file that is outside of any module roots, but still want to edit it from time to time, you can just add it to the favorites instead of making a whole top level module for it.

Basically, in one form or another, this functionality has always been present for those that needed it, but now you are forcing it on everyone, no matter if they need it or not. The project view becomes cluttered with no way to turn it off, not to mention the performance hit of IDEA scanning all those file for changes or when doing full-text searches across the whole project (this is the exact problem I'm having with my current project structure).

It doesn't look like this feature was really thought through. For instance, what exactly is the semantics of these files? You can't use the standard module options to mark any of them as excluded, or as source roots, etc, because there is no such GUI associated with the project container. The project container should only contain modules, not random files. Or are you planing to grow the project container into a more module-like entity, with all the associated functionality?


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

I'm with Martin, I'd rather see my root project files in Idea by default.

0
Comment actions Permalink

Not only it doesn't match my needs, but it's completely counter-productive in my case. It slows down IDEA to a crawl, and makes full-text search unusable. I will most certainly fight it any way I can. My only suggestion to improve it would be to provide a checkbox on the project settings page to allow me to turn it off.

I know that the IDEA team doesn't like adding too many checkboxes and options, and I certainly agree with that sentiment, but the potential negative impact of this feature is worth a checkbox I think. There are checkboxes for far more trivial options, after all.

My objection basically boils down to the lack of flexibility: I used to have a choice of which files under the project root I want to include in the project, and that choice is now denied, with disastrous results on my current project.

0
Comment actions Permalink

Hello Ivan,

Not only it doesn't match my needs, but it's completely
counter-productive in my case. It slows down IDEA to a crawl, and
makes full-text search unusable. I will most certainly fight it any
way I can. My only suggestion to improve it would be to provide a
checkbox on the project settings page to allow me to turn it off.
I know that the IDEA team doesn't like adding too many checkboxes and
options, and I certainly agree with that sentiment, but the potential
negative impact of this feature is worth a checkbox I think. There are
checkboxes for far more trivial options, after all.

My objection basically boils down to the lack of flexibility: I used
to have a choice of which files under the project root I want to
include in the project, and that choice is now denied.


I don't think that files in project base dir can produce slowdown. Please
check next build

BTW you can create dedicated module and hide this files from view

Thank you

-


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


0
Comment actions Permalink

My objection basically boils down to the lack of

flexibility: I used

to have a choice of which files under the project

root I want to

include in the project, and that choice is now

denied.

I don't think that files in project base dir can
produce slowdown. Please
check next build


My unfortunate situation is that in the root project dir there are many huge XML files and logs for various bug report test cases etc, and many classes and Run configurations with paths to those files hard-coded relative to the project root. Unfortunately, IDEA still slows down to a crawl when trying to parse huge XML files, that was one of the reasons why I didn't register them with IDEA in the first place.

It's a huge project with 20-30 interrelated CVS modules, not all of them need to be in IDEA all the time, I attach/detach the modules as needed, and the project root was the simplest location accessable to all those modules.

You can argue that this isn't the best project structure, and I would certainly agree with you, but it's out of my control and the point is that so far IDEA was flexible enough to deal with such legacy cruft, you could throw almost any bizarre directory layout to IDEA and it would adapt, with very little arbitrary limitation imposed by IDEA. Now that ability is lost.

BTW you can create dedicated module and hide this
files from view


But having them in the view is not really my problem. The problem is that IDEA is very slow parsing those big XML and text files, it scans them for changes constantly, and worst of all, when I do full-text search in the project, I get tons of unwanted results from those files that I don't want to see. Putting them in a separate module won't change this. Again, something is lost.

If I want to gain back the lost productivity, I would now have to spend days trying to rearrange module and run configurations to conform to this new limitation. Where is the pleasure in that?

This is definitely behaviour that should be configurable.

0
Comment actions Permalink

Hi Ivan,

Please try it first. If that is bad, I don't think only you will complain.

0
Comment actions Permalink

Well I don't see how it will fix the issue of search results returning 3 results from the project and 300 from the big logs and XMLs in the project root dir.

Anyway, I said everything in the previous messages, I don't have anything to add to this thread. It's up to the IDEA team to implement it how they see fit, and it's up to me to see if my productivity erodes enough to look at other alternatives.

0
Comment actions Permalink

On 2007-07-28 03:25:47 +0400, Ivan Todoroski <grnch@gmx.net> said:

Well I don't see how it will fix the issue of search results returning
3 results from the project and 300 from the big logs and XMLs in the
project root dir.

Anyway, I said everything in the previous messages, I don't have
anything to add to this thread. It's up to the IDEA team to implement
it how they see fit, and it's up to me to see if my productivity erodes
enough to look at other alternatives.


It's always good to look at alternatives, you know.
However, wouldn't Settings|General|Ignore files and folders list help
you in this case? How many unwanted files do you have there?

0
Comment actions Permalink

It's always good to look at alternatives, you know.
However, wouldn't Settings|General|Ignore files and
folders list help
you in this case? How many unwanted files do you have
there?


Hm... I thought the "ignore files" list applied the file patterns to all directories everywhere. Is it possible to specify absolute paths? Anyway, as you suspected, the list of these files is big, and more keep getting added, so it would be impractical (or atleast irritating) trying to update that small text box with every new file name.

And the files are not really unwanted, otherwise I would simply delete them. I just don't want them as part of the project, but I do use the File/Open functionality to look at them regularly.

In fact this is one of major frustrations I had with Eclipse: that it didn't allow you to edit arbitrary files, it forced you to register them in the project first. Now IDEA seems to be doing something vaguely similar, forcing me to register files that I don't want to be part of the project, simply because they happen to be in the "wrong" place (project root dir). At least the module container have an option to mark folders as "excluded", so they won't be indexed at all by IDEA, but there is no such GUI for the project container.

If you don't intend to make this feature optional, I guess my only option would be to move them somewhere in a subdirectory, but it will take a long time, because I can't just drop what I'm doing to update IDEA run configurations and build.xmls all day. It will have to happen gradually over time, and during that time I will suffer slow performance/noisy search.

I guess I just relied too much on IDEAs ability to handle almost any directory structure, and didn't see something like this coming.

0
Comment actions Permalink

At least the module container have an option to mark
folders as "excluded", so they won't be indexed at
all by IDEA, but there is no such GUI for the project
container.


For what it's worth, I tried the following even before this thread was started:

I created a dummy module, and set its content root to be the same as the project root. It then picked up all the root files which were not already registered in some other module. So, I thought I would just mark the root dir of this dummy module as "excluded", and IDEA would stop indexing the files for good.

Alas, it didn't work, if you mark this whole dummy module as "excluded", the files return to the project view! This is arguably a bug, so if you can fix it so that any files I mark as "excluded" in a module really stay excluded, no matter where they are, then all my complaints would disappear.

0
Comment actions Permalink

Hi Maxim and others, just to let you know, I tried the latest EAP (7096), and at first I had problems with full-text search taking bloody long time and bunch of exceptions being thrown. So, in a desperate attempt I removed the $HOME/.IntelliJIdea70/system/ directory, and on restart things suddenly looked much better:

1) During the slow source re-scanning phase (since I just removed the cache), I watched the window carefully, and it looks like none of the XML or text files in the project dir were indexed, but I can't be 100% sure because the file names go by so fast

2) When I tried full text search on the whole project, no results were returned from the files in the project dir!

3) When adding several large XML files directly under the project dir, and activating the IDEA window again, the file synchronization was almost instant, so I guess it only scans file existence now, not their contents (in the last few EAPs this same operation used to slow down IDEA to a crawl, with the disk grinding and CPU spiking until the rescan was finished)

This is excellent, it looks like the files in the project dir only exist as convenient links, but IDEA doesn't process them fully like the module files anymore, so performance/search is back to normal. I can certainly live with that, thanks for your patience. :)

0
Comment actions Permalink

On 2007-07-28 06:10:13 +0400, Ivan Todoroski <grnch@gmx.net> said:

>> At least the module container have an option to mark
>> folders as "excluded", so they won't be indexed at
>> all by IDEA, but there is no such GUI for the project
>> container.


For what it's worth, I tried the following even before this thread was started:

I created a dummy module, and set its content root to be the same as
the project root. It then picked up all the root files which were not
already registered in some other module. So, I thought I would just
mark the root dir of this dummy module as "excluded", and IDEA would
stop indexing the files for good.

Alas, it didn't work, if you mark this whole dummy module as
"excluded", the files return to the project view! This is arguably a
bug, so if you can fix it so that any files I mark as "excluded" in a
module really stay excluded, no matter where they are, then all my
complaints would disappear.


Makes sense. Would you please file a JIRA issue?

0
Comment actions Permalink

Makes sense. Would you please file a JIRA issue?


Done: http://www.jetbrains.net/jira/browse/IDEA-13919

Sorry for the delay, apparently I'm not getting any notification e-mails from the forum, even though I'm watching this thread.

0

Please sign in to leave a comment.