Open p4vook opened 4 years ago
Yeah I tried using https://github.com/romkatv/zsh-prompt-benchmark but it's for zsh only. When I wrote trueline I tried to optimize startup time rather than this scenario described in your video. Let's leave this open then and I'll try to tackle it (no idea when though). Thanks for the report (feel free to open a PR if you get to this before I do)
My friend told me another way of benchmarking: copy and paste this script into bash:
start=$(date +"%s.%N")
end=$(date +"%s.%N")
printf "print(($end - $start) / 100)" | python3
This is accurate. I get about 65 ms when my processor runs 4 GHz, if it's frequency is about 900 MHz (typical battery saving), I get about 175 ms.
Hello! Happy new year) I realized that
benchmarking command is bad, because as seems to me, it does not render PS1. I held enter, recorded screen and saw, that rendering takes about 6 frames (look at frames 243-249), which is about 85 ms (framerate is 70 FPS). And I think, it's the reason to borrow some stuff from powerlevel10k. (the original video may be found here)![recording](https://user-images.githubusercontent.com/38429428/71908131-7d891e80-317e-11ea-886b-7e6935764fbf.gif)