Scille / parsec-cloud

Open source Dropbox-like file sharing with full client encryption !
https://parsec.cloud
Other
267 stars 40 forks source link

Should we add a monitor to handle the prevent sync pattern ? #7799

Open FirelightFlagboy opened 2 months ago

FirelightFlagboy commented 2 months ago

https://github.com/Scille/parsec-cloud/blob/956d139e09840536c18fcb4db3b19ec94b9cea11/libparsec/crates/client/src/workspace/store/mod.rs#L196

I guess this operation can take a long time in case the sync pattern is not currently fully applied and the workspace is big enough (I guess recursive_apply_prevent_sync_pattern doesn't need to download manifest that are not yet available, otherwise it's even worse performance wise)

The issue is obviously this slow down the startup of the workspace. Another approach would be to introduce a dedicated monitor that would:

This way the long operation is run in a dedicated coroutine and doesn't slow down anything else \o/

_Originally posted by @touilleMan in https://github.com/Scille/parsec-cloud/pull/7781#discussion_r1691340508_

FirelightFlagboy commented 2 months ago

WDYT @vxgmichel ? cc @touilleMan