High CPU usage with kafkacat colored stream
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: 3.3.9
- OS version: 10.15.3
- Attach com.googlecode.iterm2.plist here (drag-drop from finder into this window)
- Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog
- Are you reporting a performance issue, excessive CPU usage, or a hang? Please attach a sample. Instructions at iterm2_high_cpu_kafkacat.txt
- Are you reporting a crash? Please attach the crash log. Instructions at https://gitlab.com/gnachman/iterm2/wikis/crash-logs
- Are you reporting excessive memory usage? Please attach a heap analysis: https://gitlab.com/gnachman/iterm2/wikis/heapshot
Detailed steps to reproduce the problem:
- run kafkacat -C -b host -t topic | jq -c '.'
- run kafkacat -C -b host -t topic | jq -M -c '.'
-M parameter tells jq to do monochromatic output. It appears that the "color rendering" on iTerm is done on CPU and/or the algorithm that is doing it is pretty slow.
What happened: at 1: iTerm CPU usage will go up to 60% versus 3% on Alacritty at 2: iTerm CPU usage will go up to 20% versus 2% on Alacritty
What should have happened: Keep CPU usage low.