3 ms·
Get notification of file change, binary search the list of files, make adjustments. This can also be done on a small amount of memory, independent of file coun
by Dylan16807 9y ago
Get notification of file change, binary search the list of files, make adjustments. This can also be done on a small amount of memory, independent of file count.
I'm sure it's tricky to update the existing software, but as a generic problem syncing files with O(1) or O(logn) memory is not very hard.
- Tempest1981 9y agoWindows' notification API gets an overflow (ERROR_NOTIFY_ENUM_DIR) if you change many files quickly, like during a copy/paste in explorer. You then have to re-scan the dir manually. While rescanning, the files may continue to change. You may or may not get a subsequent event for a file that changed during your rescan. One example of related issues: https://github.com/libuv/libuv/issues/626 https://github.com/libuv/libuv/issues/626
- Dylan16807 9y agoI'm aware of how awful notification APIs can be, but that's a separate problem entirely from per-file memory use.
- pjc50 9y agoWhere's your sync client then? (I've been very slowly designing my own, and the first thing for me was coming up with a list of awkward cases ..)
- dingo_bat 9y agoThis seems like a good project. Thanks.
- Dylan16807 9y ago> Where's your sync client then? I guess I was unclear here. It's hard to make a polished user application. The not-hard part is just the core algorithm selection. I have enough minutes in the day to consider algorithms, but not enough tens of hours to write suites of quality software products.