diff options
author | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-07-24 09:03:05 +0300 |
---|---|---|
committer | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-07-24 18:54:29 +0300 |
commit | a41dc00160f1a2510ab71cfcff9ef0c61ff3f6e8 (patch) | |
tree | 52eb9187772f6398eb1acc45d3ee942124228eec /test/syncenginetestutils.h | |
parent | 5a1bf7d8feb1900fd93ca4f9c613cef4c9cbff93 (diff) |
Don't keep the list of touched files for the whole sync
We only want to know if they were touched within the last 15 seconds,
so change the data structure to use a QMultiMap, and sort them by
QElapsedTimer. This allows us to iterate over old entries ordered by
time and to stop once we find a recent entry.
This makes the look-up slower but in most cases the folder watcher
will report any change within milliseconds, and we start from the
most recent. What this really makes slower are actual user file
changes while a fast sync is underways which will need to iterate
over the whole map to find out the file isn't there.
This reduces the growth of the memory usage when downloading a large
amount of files.
Diffstat (limited to 'test/syncenginetestutils.h')
0 files changed, 0 insertions, 0 deletions