Speed up the RepositoriesViewContentProvider
Some enhancements for the working tree part:
* It's not necessary to sort in the content provider since we have a
RepositoriesViewSorter. Besides, that sorting was very inefficient
because it repeatedly queried File.isDirectory(), which is an
expensive call on Windows.
* Short-cut the hasChildren() call for files and folders. This gives
a significant speedup for large directories; the old implementation
actually read the whole directory for a folder, but using a
DirectoryStream we can stop reading after the first entry.
* Use Files.walkFileTree() with depth 1 to get the children and their
attributes in one go on Windows. On Linux, this shouldn't make any
difference; there'll be one call to get file attributes to determine
isDirectory() anyway, but on Windows, this saves an extra call to
getAttributes() per child.
Change-Id: Ie0bf1d89167f4399f72e4f9372aeea3dff24a320
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>