I got the 6 second load time down to 2 seconds by fixing slow sort code. I'll do a PR. This is the before and after code ...
sortBy: (array) ->
array.sort (a, b) ->
if atom.config.get('git-projects.sortBy') is 'Project name'
a.title.toUpperCase() > b.title.toUpperCase()
else if atom.config.get('git-projects.sortBy') is 'Latest modification date'
fs.statSync(a.path)['mtime'] < fs.statSync(b.path)['mtime']
else if atom.config.get('git-projects.sortBy') is 'Size'
fs.statSync(a.path)['size'] < fs.statSync(b.path)['size']
sortBy: (array) ->
sortfunc = switch atom.config.get('git-projects.sortBy')
when 'Project name' then (a, b) ->
a.title.toUpperCase() > b.title.toUpperCase()
when 'Latest modification date' then (a, b) ->
fs.statSync(a.path)['mtime'] < fs.statSync(b.path)['mtime']
when 'Size' then (a, b) ->
fs.statSync(a.path)['size'] < fs.statSync(b.path)['size']
array.sort sortfunc
I got the 6 second load time down to 2 seconds by fixing slow sort code. I'll do a PR. This is the before and after code ...