Evaluate indexing time

Answered

I use the Jetbrains documentation to evaluate the indexing time with ij-shared-indexes-tool-cli on Windows 11 (CMD) . After executing the command

.bin\ij-shared-indexes-tool-cli boost --ij <MY_IDE_DIR> --project <MY_PROJECT_DIR>

I get the error 

Exception in thread "main" java.lang.IllegalArgumentException: Cannot find IDE build.txt file in C:\Program Files\JetBrains\PhpStorm 2023.2.3\bin\build.txt
        at com.intellij.extras.runner.IntelliJUnpackKt.readFullBuildNumber(IntelliJUnpack.kt:72)
        at com.intellij.extras.runner.IntelliJUnpackExeKt.intelliJExecutableWindows(IntelliJUnpackExe.kt:28)
        at com.intellij.indexing.shared.builder.IntelliJ$LocallyInstalled.toExecutable$ij_shared_indexes_tool(IntelliJ.kt:82)
        at com.intellij.indexing.shared.builder.ShortcutsKt.warmupRun(Shortcuts.kt:238)
        at com.intellij.indexing.shared.builder.ShortcutsKt.measureSharedIndexesBoost(Shortcuts.kt:169)
        at com.intellij.indexing.shared.builder.ShortcutsKt.measureSharedIndexesBoost(Shortcuts.kt:130)
        at com.intellij.indexing.shared.builder.ShortcutsKt.measureSharedIndexesBoost$default(Shortcuts.kt:119)
        at com.intellij.indexing.shared.builder.MainKt.main(Main.kt:53)

I tryed this with the paths

1) "C:\Program Files\JetBrains\PhpStorm 2023.2.3\bin"
2) "C:\Program Files\JetBrains\PhpStorm 2023.2.3\bin\phpstorm64.exe"

I dont use the Toolbox App.

0
6 comments
Hi,

Please try this PATH C:\Program Files\JetBrains\PhpStorm 2023.2.3 instead.
0

Hi,

this worked for me, many thanks!

But now, I get the next exception:

Exception in thread "main" java.lang.IllegalStateException: Non-zero exit code during project warmup, see logs in C:\Users\<MY_UNSER>\ij-shared-indexes-tool-cli-0.9.8\ij-shared-indexes-tool-data\temp\ij-tmp-1702286462452\log
        at com.intellij.extras.runner.IntelliJRunnerKt.checkSuccessful(IntelliJRunner.kt:24)
        at com.intellij.indexing.shared.builder.ShortcutsKt.warmupRun(Shortcuts.kt:254)
        at com.intellij.indexing.shared.builder.ShortcutsKt.measureSharedIndexesBoost(Shortcuts.kt:169)
        at com.intellij.indexing.shared.builder.ShortcutsKt.measureSharedIndexesBoost(Shortcuts.kt:130)
        at com.intellij.indexing.shared.builder.ShortcutsKt.measureSharedIndexesBoost$default(Shortcuts.kt:119)
        at com.intellij.indexing.shared.builder.MainKt.main(Main.kt:53)

The content of my \ij-shared-indexes-tool-data\temp\ij-tmp-1702286462452\log\vmoptions.txt

-Xmx4059m

#  IntelliJ Runner

-Dshared.indexes.project.download=false
-Dshared.indexes.jdk.download=false
-Dshared.indexes.maven.download=false
-Dshared.indexes.php.download=false
-Dshared.indexes.python.download=false

#  IntelliJ Runner Defaults

-Djava.awt.headless=true
-Dide.no.platform.update=true
-Didea.system.path=C:\Users\<MY_USER>\ij-shared-indexes-tool-cli-0.9.8\ij-shared-indexes-tool-data\temp\ij-tmp-1702286462452\system
-Didea.log.path=C:\Users\<MY_USER>\ij-shared-indexes-tool-cli-0.9.8\ij-shared-indexes-tool-data\temp\ij-tmp-1702286462452\log
-Dide.browser.jcef.enabled=false
-Djava.io.tmpdir=C:\Users\<MY_USER>\ij-shared-indexes-tool-cli-0.9.8\ij-shared-indexes-tool-data\temp\ij-tmp-1702286462452
-Dvcs.log.index.git=false
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=C:\Users\<MY_USER>\ij-shared-indexes-tool-cli-0.9.8\ij-shared-indexes-tool-data\temp\ij-tmp-1702286462452\log
-XX:+CrashOnOutOfMemoryError
-XX:ErrorFile=C:\Users\<MY_USER>\ij-shared-indexes-tool-cli-0.9.8\ij-shared-indexes-tool-data\temp\ij-tmp-1702286462452\log
0
Please share the log folder zipped from C:\Users\\ij-shared-indexes-tool-cli-0.9.8\ij-shared-indexes-tool-data\temp\ij-tmp-1702286462452\log so we could check why it fails.

You can upload it in https://uploads.jetbrains.com/ and share us the upload id.
0
My current guess is that the passed PhpStorm is already opened and by some reason the tool cannot re-use it.
Does it help if you close all PhpStorm instance, and run that command again?
0

I have closed all PhpStorm instance and the process was executed. 

The result >  `No project shared indexes` vs `project shared indexes`: 15s 615ms vs 12s 190ms

I think i can ignore this tool for my work.

Thank you very much!

0
Thanks for the info.
The shared indexes feature often helps for large projects (like a big project that needs more than 60s for indexing).
For a project that only need 15 second to index, this is often not needed.
0

Please sign in to leave a comment.