open project, invalidate caches from command line.

Hi,

I would like to start intellij, open a project and once intellij indexes - invalidate caches and exit intellij process. I would like to repeat this experiment to find out indexing time taken by intellij for various sized projects.
[Note: I have instrumented/modified intellij community edition to log index time. So, I'll get the index time from idea.log]

Is there a way to do this?

Thanks,
Chandra

4 comments
Comment actions Permalink

Hello chandra,

You can use DumbModeListener.exitDumbMode() to get a notification when indexing
is complete, FSRecords.invalidateCaches() to invalidate the caches and Application.shutdown()
to exit IntelliJ IDEA.

I would like to start intellij, open a project and once intellij
indexes - invalidate caches and exit intellij process. I would like to
repeat this experiment to find out indexing time taken by intellij for
various sized projects.

[Note: I have instrumented/modified intellij community edition to log
index time. So, I'll get the index time from idea.log]

Is there a way to do this?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Dmitry,

Thanks for the reply.

Is there any API to find number of files indexed?
I can get the information from com.intellij.util.indexing.FileBasedIndexing, I would like to get this information through an API (instead of patching/modifying FileBasedIndexing.java, and patching ulitmate edition with that).

Thx,
Chandra

0
Comment actions Permalink

Hello chandra,

No, there is no API for that, because we've never needed that.

Is there any API to find number of files indexed?
I can get the information from
com.intellij.util.indexing.FileBasedIndexing, I would like to get this
information through an API (instead of patching/modifying
FileBasedIndexing.java, and patching ulitmate edition with that).


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Before intellij starts indexing, it spends some time in 'Scanning for files ..'. Is there a way to get time spent in this 'scanning for files' operation?

0

Please sign in to leave a comment.