Potential Things To Background

Should scanning for files to

index really be a modal dialog?

Is there a reason that it can't be in the background?

What about launching applications?

Why can they not be launched when indexing is active?

Does IDEA need the index to run them or are they just executed as external applications?

Similarly, ANT tasks seem to be run as external applications too, but they are not available when indexing is active.

Can someone explain?

2 comments

my guess: jetbrains thinks that you don't spend very much time waiting for idea to finish its indexing, so switching off everything that *might remotely depend on it* is far easier than forcing each plugin and feature to tell idea if it needs the index.

0

HamsterofDeath is right in general. In fact, almost all "smart" functionality (mainly PSI engine) depends on indices. When background indexing is active (we call it "dumb mode") all PSI clients are disabled unless they explicitly state that they can tolerate the absence of indices. The switch "normal mode" -> "dumb mode" and back is not a "cheap" operation. Indices are constantly updated and if we switched to dumb mode every time we needed to update a couple of files, you'd notice UI "flickering" because of lots of actions were enabled/disabled quite often. So we have a threshold (the number of files to update) upon which we decide whether it is ok to update indices on the spot, transparently for the clients, or it is worth entering dumb mode and leave only the editor operational. The initial scan, that determines the number of files to update, thus is done before endering the dumb mode. Upon results of the scan we decide whether to switch to dumb mode or not. Recently we did this scan in background and had to ender dumb mode "in advance". There were too many switches between the modes which gave not the best user experience. Thus the decision was made to do initial scan in advance under a modal progress. The scan itself does not take much time so it is a good compromise.

Eugene.

0

Please sign in to leave a comment.