emuell / restic-browser

A GUI to browse and restore restic backup repositories.
MIT License
664 stars 19 forks source link

Performance / Speed improvement #84

Open AxelPetermann opened 11 months ago

AxelPetermann commented 11 months ago

I've got the impression, that restic-browser is quite slow in opening folders and sub-folders. Not sure how kopia or npbackup are doing this, but they are much faster.

Can something be done on the performance side?

emuell commented 10 months ago

Not sure what kopia does (does it use restic at all?), but npbackup seems to use rustic as an external binary, just like Restic-Browser, so they should work similarly.

Restic-Browser basically does a restic SNAPSHOT ls --json PATH to get the contents of the current folder in the selected snapshot. Most of the time seems to be spent warming up, reading general repository info, so loading the whole snapshot list isntead of just contents in a given path may speed things up after the initial load. However, the initial load will be longer. Perhaps that's what npbackup does.

I personally hope, but haven't tested, that using the rustic library instead of the restic binary may speed things up by reducing the "warm-up" phase. Loading the entire contents of the snapshot in one go might also be an option, but then all the contents would have to be shown/displayed as they are fetched, which can be tricky to implement.