snowtrack / snowfs

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

Commit larger files is too slow #226

Closed sebastianrath closed 2 years ago

sebastianrath commented 3 years ago

Here we use the crypto module to calculate the content of a file.

https://github.com/Snowtrack/SnowFS/blob/4a2bfbdb352af1578fbf96c87d5d522e1c376f48/src/common.ts#L74-L90

It turns out that the standalone executable of SnowFS executes the update function faster than in Snowtrack, which means something is fishy here.

1GB Commit Test

Screen Shot 2021-07-17 at 10 00 38 PM

Furthermore you see a close-up of the update call here: Around 2.49ms per call. Screen Shot 2021-07-17 at 10 25 37 PM

Actual Behavior

If I execute the same function on the same file inside Electron the overall graph looks very similar:

Screen Shot 2021-07-17 at 10 20 51 PM

But different Electron versions show different runtimes. Instead of 2.5ms, both Electron versions are considerably slower:

Electron 8.5.5: Screen Shot 2021-07-17 at 10 42 17 PM

Electron 13.1.6: Screen Shot 2021-07-17 at 11 21 50 PM

I reported the issue also to Electron, see here.