387 karma · joined September 30, 2022
Interesting. When you say "even when hundreds of KBs are allocated", do you mean this is allocating variables with large values, or tons of small variables? My case was the latter, and with that I saw a noticeable slowdown on Dash.
Simplest repro case:
$ cat many_vars_bench.sh
#!/bin/sh
_side=500
i=0
while [ "${i}" -lt "${_side}" ]; do
j=0
while [ "${j}" -lt "${_side}" ]; do
eval "matrix_${i}_${j}=$((i+j))" || exit 1
: $(( j+=1 ))
done
i=$((i+1))
done
$ time bash many_vars_bench.sh
5.60user 0.12system 0:05.78elapsed 99%CPU (0avgtext+0avgdata 57636maxresident)k
0inputs+0outputs (0major+13020minor)pagefaults 0swaps
$ time dash many_vars_bench.sh
40.75user 0.14system 0:41.22elapsed 99%CPU (0avgtext+0avgdata 19972maxresident)k
0inputs+0outputs (0major+4951minor)pagefaults 0swaps
Dash was ~8 times slower. Increase the side of the square "matrix" for a proportionally bigger slowdown (this one uses 250003 variables).> One thing we did notice is that subshells can be a bottleneck when the environment is large, and so we avoided subshells as much as possible in the runtime library. Did you observe the same in your testing?
Yes, launching a new process is generally expensive and so is spawning a subshell. If the shell is something like Bash (with a lot of startup/environment setup cost) then you'll feel this more than something like Dash, where the whole point was to make the shell small and snappy for init scripts: https://wiki.ubuntu.com/DashAsBinSh#Why_was_this_change_made...
In my limited testing, Bash generally came out on top for single-process performance, while Dash came out on top for scripts with more use of subshells.
100 years ago it was unthinkable for common people to eat red meat every day, they just couldn't afford it. Today, we are privileged enough that we can afford to do so, but just because we can it doesn't mean we should. It's not good for you.
Same happens in the tech world: we can afford to buy new tech devices to keep up with the bloat that inevitably envelops most things, but should we?
Here's some issues that were filed for this same problem:
- https://github.com/lapce/lapce/issues/2732
- https://github.com/lapce/lapce/issues/2773
- https://github.com/lapce/lapce/issues/2737
[^1]: https://github.com/lapce/floemFor all the rest, perhaps give https://github.com/edc/bass a try.
True, but even so, you can train the employee for the new role. You need to do the same anyway for a new, external candidate (and it's even worse because they will need to familiarise themselves with internal tools and processes that the Maps employee would already be familiar with).
I also enjoy a tactical use of smileys and other emojis where applicable :)
EDIT: I didn't know of Bish, but from its code samples we seem to have converged on similar syntax :)
That said, for mobile use Organic Maps is pretty good: https://organicmaps.app/