snowtrack / snowfs

SnowFS v1 - a fast, scalable version control file storage for graphic files :art:
https://www.snowtrack.io
GNU General Public License v3.0
1.3k stars 43 forks source link

checkout way too slow #219

Closed sebastianrath closed 3 years ago

sebastianrath commented 3 years ago

The checkout command is way too slow

Before (as advertised)

time snow checkout HEAD~1
> 0.20s user
> 0.08s system
> 85% cpu 0.321 total

Current (unacceptable) state

time snow checkout HEAD~1
> 12.39s user
> 7.87s system
> 173% cpu 11.668 total

This is caused by a safety-feature that calculates the hash of each file to determine if the file must be moved to the trash or can be safely deleted since there is a backup in the object database. https://github.com/Snowtrack/SnowFS/blob/0deb12f20295ff2ca6c65ddcedbdf2b2e64bc643/src/repository.ts#L332