Task summary
$ time ide -tv
No http proxy configured.
No https proxy configured.
Looking for IDE_HOME in D:\projects\salog\workspaces\main\salog
Looking for IDE_HOME in D:\projects\salog\workspaces\main
Looking for IDE_HOME in D:\projects\salog\workspaces
Looking for IDE_HOME in D:\projects\salog
Starting step ide with params [-v]...
Trying to match arguments to commandlet version
Trying to match argument '-v'
Next property candidate to match argument is KeywordProperty[version | -v:null]
Running commandlet VersionCommandlet[version]
2025.10.002-10_29_02-SNAPSHOT
Step 'ide' ended successfully.
ide (-v) succeeded after PT0.006S
real 0m2.497s
user 0m0.015s
sys 0m0.109s
So in general our product is very fast (0.006S) but ide env --bash is run implicitly afterwards and that became slow because we call npm commands:
$ ide -d env --bash
...
Running command 'D:\projects\salog\software\node\npm.cmd' with arguments 'list' '-g' 'yarn' '--depth=0' ...
...
Running command 'D:\projects\salog\software\node\npm.cmd' with arguments 'list' '-g' 'corepack' '--depth=0' ...
Running command 'D:\projects\salog\software\node\npm.cmd' with arguments 'list' '-g' '@angular/cli' '--depth=0' ...
...
Additional context
The problem comes from here:
|
VersionIdentifier installedVersion = tool.getInstalledVersion(); |
|
if (installedVersion != null) { |
And in NpmBasedCommandlet we have this causing the execution:
|
protected VersionIdentifier computeInstalledVersion() { |
|
return runPackageManagerGetInstalledVersion(getPackageName()); |
|
} |
However, to determine if the tool is installed or not, we do not have to know its version.
Task summary
So in general our product is very fast (0.006S) but
ide env --bashis run implicitly afterwards and that became slow because we callnpmcommands:Additional context
The problem comes from here:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/commandlet/EnvironmentCommandlet.java
Lines 139 to 140 in 8fa3bff
And in
NpmBasedCommandletwe have this causing the execution:IDEasy/cli/src/main/java/com/devonfw/tools/ide/tool/npm/NpmBasedCommandlet.java
Lines 48 to 50 in 8fa3bff
However, to determine if the tool is installed or not, we do not have to know its version.