perf: SFTP directory listing cache

- Added dirCache map to sftpPane for caching directory listings
- Cache hit: instant navigation (no disk/network I/O)
- Cache miss: read from disk/SFTP, store in cache per path
- R key clears current directory cache and forces fresh read
- Significant speedup when navigating back to previously visited folders
This commit is contained in:
swanadiva
2026-06-24 11:46:17 +07:00
parent 2a8940211c
commit 8f1f2226f3
2 changed files with 49 additions and 3 deletions
+7
View File
@@ -39,6 +39,13 @@
- Stacked: `maxH = t.height - 6`; Side-by-side: `maxH = t.height - 5`
- Breakpoints: compact (<60), medium (60100), wide (≥100)
### SFTP Performance Fix
- Added directory listing cache (`dirCache map[string][]os.FileInfo`) to each pane
- Cache hit: instant navigation (no disk/network call)
- Cache miss: read from disk/SFTP, store in cache
- `R` key now clears cache for current directory and forces re-read
- Cache is per-path: navigating to a previously visited folder is instant
## v1.0.0 (2025-01-30)
### Added