chrisjbillington / git-nautilus-icons

A nautilus Python extension to overlay icons on files in git repositories
BSD 2-Clause "Simplified" License
43 stars 4 forks source link

Slow when moderate number of folders in large repo #2

Closed chrisjbillington closed 8 years ago

chrisjbillington commented 8 years ago

Determining folder status currently involves a loop over all files a repo to determine whether they are in the folder. This is inefficient and appears to dominate Nautilus loading time for large repos with a moderate number of folders in the directory being viewed (tested on the linux git repo, takes like 2 seconds).

Some sort of tree structure should be used instead to store the individual file statuses, so that files in a directory can be obtained in O(folder_depth) time instead of O(n_files).