diff --git a/README.md b/README.md index 7046df1d..abb085df 100644 --- a/README.md +++ b/README.md @@ -147,17 +147,20 @@ Columns define the current directory where the prompt was rendered. * `~/nerd-fonts` -- [nerd-fonts](https://github.com/ryanoasis/nerd-fonts) git repo with 4k files. +Here's how the prompt looked like during benchmarking. + +![](https://raw.githubusercontent.com/romkatv/powerlevel10k/master/prompt.png) + +It was identical in Powerlevel10k and Powerlevel9k. Even though Powerlevel10k can dynamically +switch to async prompts, it wasn't happening here because latencies were low. Prompts with both +themes were essentially synchronous with every prompt having up-to-date git info. + _This table used to have another column for Linux kernel git repo, which is massive. It's been removed because it's not a fair comparison. Powerlevel10k automatically detects that fetching git status is slow and switches to async prompt generation, which allows it to achieve 2 ms prompt latency but not all its prompt have up-to-date git info. Those that don't, have vcs segment greyed out._ -Here's how the prompt looked like during benchmarking (identical by design in Powerlevel9k and -Powerlevel 10k): - -![](https://raw.githubusercontent.com/romkatv/powerlevel10k/master/prompt.png) - Configuration that was used: ```zsh @@ -176,6 +179,9 @@ POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=orange1 POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=black function custom_rprompt() echo -E "hello world" + +sleep 86400 & # spawn two background jobs +sleep 86400 & ``` Here's the same benchmark for Windows Subsystem for Linux (WSL) with zsh running in the standard @@ -191,6 +197,22 @@ Command Prompt (`cmd.exe`). The fastests results are probably limited by the key repeat rate. +Here's Raspberry Pie 3. I replaced [nerd-fonts](https://github.com/ryanoasis/nerd-fonts) repo with +[git](https://github.com/git/git) in this benchmark becase the former didn't fit on my SD card. +Git repo had 3.6k files, so about the same size. I set `POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=1` +to prevent Powerlevel10k from switching to async prompts. The default threshold is 0.05, or 50 ms, +after which Powerlevel10k will go async (git latency in ~/git was close to 100 ms, so above the +default 50 ms). Naturally, async is a good thing, so you shouldn't disable it in your configs. I +only did it to measure sync latency. + +| Theme | / | ~/git | +|---------------------|----------:|-----------:| +| powerlevel9k/master | 312 ms | 584 ms | +| **powerlevel10k** | **15 ms** | **108 ms** | +| naked zsh | 1 ms | 1 ms | + +The `next` branch of Powerlevel9k didn't work on Raspberry Pie, so I couldn't benchmark it. + ## What's the catch? Really, there is no catch. It's literally the same prompt with the same flexibility