Load partial files lazily for preview
- Langage dominant
- Rust
- Étoiles
- 22.5k
- Forks
- 773
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
**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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
L’issue ne nomme aucun fichier ni test. Commencez par retracer la manière dont gitui charge les fichiers pour les aperçus et reproduisez les saccades avec un fichier volumineux. Le travail est terminé lorsque les aperçus ne chargent que la portion initiale nécessaire et que l’UI reste réactive.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- git, rust
- Domaine
- cli, performance
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100