gitui-org / gitui-org/gitui

Load partial files lazily for preview

オープン
#2,256 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
feature-request
主要言語
Rust
スター
22.5k
フォーク
773
PR マージ指標
30日以内にマージされた PR はありません

説明

**Is your feature request related to a problem? Please describe.**
If you have large files in your repo, gitui tries to load more than what is required, and it seems to block the ui partially, and causes application to freeze for a few seconds depending on the performance of the machine, it almost froze on my rpi, but it was just a 1-2 second stutter on my workstation.

**Describe the solution you'd like**
I am unsure about the implementation. But it should provide lazy "partial" file loading for previews so that it only loads the first N bytes required for displaying the preview. It should be fairly easy to implement it irrespective of platform and will help avoid the cost of fetching large files.

Also, I am not entirely sure if this is a feature request but as it didn't feel fair calling it a bug so here it is.

**Describe alternatives you've considered**
None, I can't think of any other solutions, in case it's already implemented it might be worth looking into why it stutters with large files, we can also directly back the preview with Mmap to ensure not more than the part of the file required for preview is loaded (I haven't written interactive tui in rust much, so I am unsure, but I think it shouldn't be hard to implement).

**Additional context**
Will try to find time to implement it, also have a look at gitui code base while I am at it.

I don't use gitui much, but it's a nice to have, to stage changes partially, thanks for the hard work folks.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

このissueではファイルもテストも指定されていません。まず、gituiがプレビュー用にファイルを読み込む方法を追跡し、大きなファイルでカクつきを再現します。完了条件は、プレビューが必要な初期部分だけを読み込み、UIの応答性が維持されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, rust
領域
cli, performance
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。