![环境变量数量对进程启动时间的影响](https://linux22.com/image/1533367/%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E6%95%B0%E9%87%8F%E5%AF%B9%E8%BF%9B%E7%A8%8B%E5%90%AF%E5%8A%A8%E6%97%B6%E9%97%B4%E7%9A%84%E5%BD%B1%E5%93%8D.png)
我在启动一个进程之前导出了 30,000 个环境变量,我发现该进程的启动时间很长。
uruddarraju$ for i in {1..30000}; do export KUBE_SVC_${i}=443; export KUBE_SVC_HOST_$i=192.162.0.1; done;
uruddarraju$ time git clone https://****:[email protected]/uruddarraju/rnpcinode
-sh: /usr/bin/git: Argument list too long
real 0m25.038s
user 0m24.829s
sys 0m0.096s
编辑 1:没有环境变量
time git clone https://****:[email protected]/uruddarraju/node
Cloning into 'node'...
remote: Counting objects: 131, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 131 (delta 4), reused 0 (delta 0), pack-reused 122
Receiving objects: 100% (131/131), 126.46 KiB | 0 bytes/s, done.
Resolving deltas: 100% (26/26), done.
real 0m0.433s
user 0m0.059s
sys 0m0.075s
我想知道环境变量的数量将如何影响从开始到结束的进程完成时间。