csync_reconcile: Optimize reconcile by avoiding alocations
authorOlivier Goffart <ogoffart@woboq.com>
Sun, 24 Sep 2017 19:58:41 +0000 (21:58 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 5 Oct 2017 20:01:37 +0000 (22:01 +0200)
commit917e2e43c64fd0faf4ff15744f5d6b5e5f3019da
tree18e6d523d342dfb641513e4bd4e8774276294319
parentbdd3dc743b1a7117e758ae5dd5ba4495139e485c
csync_reconcile: Optimize reconcile by avoiding alocations

Fix performence regression from commit d66c2b5faecc689c52df23d7dbc44c894b92febc
For every new file we would look up every parent directories. Allocating
a new QByteArreay for every parent riectory just to know if it is in the other
tree is wasting lots of CPU.
Use a ByteArrayRef trick, similar to QStringRef
src/csync/csync_private.h
src/csync/csync_reconcile.cpp