zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
19.46k stars 613 forks source link

fix(terminal): only refresh process specifics for given PID in get_cwd() #3472

Open Hylian opened 3 days ago

Hylian commented 3 days ago

Update get_cwd() to only refresh process specifics for the given PID, matching the get_cwds() implementation.

This significantly reduces the latency of opening a new Pane or Tab.

On a 64-core Threadripper system, this reduces the latency of get_cwd() from 850ms to 1ms. On an 8-core Ryzen system, the improvement is smaller, but still perceptible.