Why is Fetching Path Info for Restore so slow?

Very slow folder browsing during restore said it’s “caused by a large table of paths needing to be filtered”, which I think is referring to the File table where the Path for some file is kept – and a row created if the file changes. That’s a flat list to search through. There didn’t used to be folder organization, but there is now.

Local database is a somewhat obsolete simplified view showing how a fileset points to files which point to a set of data blocks and a set of metadata blocks. What’s changed, and might be relevant to fixing issue:

Feature/fix path storage2 #3468 made File a view and added PathPrefix and FileLookup tables to schema.

broken: v2.0.4.13-2.0.4.13_canary_2019-01-29

Changed the internal storage of paths to use a prefix method. This should reduce the size of the database significantly and enable much faster database queries later on

I didn’t write that text, but because the prefix is a folder, it possibly opens the door to faster folder opens…