cd into directory that with a .rtx.toml for the first time was very very slow
Describe the bug
cd into directory with .rtx.toml for the first time was very slow. next time it's very fast. I guess the problem may be due to adding the .rtx.toml to tracking files (~/.local/share/rtx/tracked_config_files/). it's not related to whether the versioned tool installed or not in .rtx.toml.
To Reproduce
Steps to reproduce the behavior.
$ mkdir -p /tmp/test1
$ wget -O /tmp/test1/.rtx.toml https://raw.githubusercontent.com/dfang/ansible-role-rtx/main/.rtx.toml
$ cd /tmp/test1
time cd /tmp/xxx is not helpful on measuring here. the shell hangs for quite a few seconds
Expected behavior
very fast
rtx doctor output
rtx doctor
rtx version:
1.34.1 linux-x64 (76f8de3 2023-07-14)
build:
Target: x86_64-unknown-linux-gnu
Features: SELF_UPDATE
Built: Fri, 14 Jul 2023 17:59:02 +0000
Rust Version: rustc 1.70.0 (90c541806 2023-05-31)
Profile: release
shell:
/bin/bash
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
rtx environment variables:
RTX_CONFIRM=yes
RTX_EXPERIMENTAL=1
RTX_DATA_DIR=/home/ubuntu/.local/share/rtx
RTX_ALWAYS_KEEP_INSTALL=1
RTX_ALWAYS_KEEP_DOWNLOAD=1
RTX_VERBOSE=1
RTX_SHELL=bash
settings:
{"always_keep_download": "true", "always_keep_install": "true", "asdf_compat": "false", "disable_default_shorthands": "false", "disable_tools": "[]", "experimental": "true", "jobs": "4", "legacy_version_file": "true", "legacy_version_file_disable_tools": "[]", "log_level": "INFO", "missing_runtime_behavior": "warn", "plugin_autoupdate_last_check_duration": "10080", "raw": "false", "trusted_config_paths": "[]", "verbose": "true"}
config files:
/tmp/test1/.rtx.toml
plugins:
go https://github.com/rtx-plugins/rtx-golang.git#23c62dd
gradle https://github.com/rfrancis/asdf-gradle.git#9a2ca80
java (core)
maven https://github.com/halcyon/asdf-maven.git#625d6e5
mvnd https://github.com/joschi/asdf-mvnd#03940a1
node (core)
poetry https://ghproxy.com/https://github.com/rtx-plugins/rtx-poetry.git#3d4c703
python (core)
ruby (core)
toolset:
[email protected], [email protected]
1 problem found:
plugin pdm is not installed
Additional context Add any other context about the problem here.
I've experienced this myself and it's due to the Python virtualenv being created. Given you are using python virtualenvs I'd bet that's it.
I've thought there should be better UX are Python virtualenvs and have an issue open regarding. #634
yeah there should be some output when it is being created
😵💫
Currently I add this export RTX_FETCH_REMOTE_VERSIONS_TIMEOUT=10ms to my .bashrc to disable the check.
but the side effect is rtx ls-remote not works for me. I have unset RTX_FETCH_REMOTE_VERSIONS_TIMEOUT before run rtx ls-remote temporarily
closing since this issue isn't specific enough