prrrnd / atom-git-projects

List and open your local Git projects in Atom.
MIT License
37 stars 18 forks source link

Performance with large amounts of projects #47

Open stephen304 opened 9 years ago

stephen304 commented 9 years ago

I have 65 git folders in my ~/git and this plugin seems to load about 15 seconds every time I press ctrl + alt + o.

Perhaps it needs to cache the contents of the projects folder and asynchronously update instead? That way when you ctrl + alt + o and type, you are searching the cached version while it asynchronously updates, and if you leave it open long enough for it to finish, it updates the search with the fresh project listing.

It's made worse by the fact that the whole UI freezes while it's loading.

stubailo commented 8 years ago

Same here, I have 197 git projects (wow, that's crazy)

fakewaffle commented 8 years ago

Ditto.

jccr commented 8 years ago

I attempted to do just this with this PR: https://github.com/prrrnd/atom-git-projects/pull/44

Although lately I've noticed that the cache seems to be cleared on every startup. It relies on atom's serialization and deserialization of plugins (https://github.com/prrrnd/atom-git-projects/blob/master/lib/git-projects.coffee#L57). I didn't want to introduce a cache at the filesystem level, or use another way of persisting. Maybe this needs to be looked after again.

stephanfriedrich commented 8 years ago

At First Awesome Plugin ;). I have the same Problem, and thought project-indexing was fixed. But works not as expected :(

41

stephen304 commented 8 years ago

@JCCR Another possible solution would be to update asynchronously in the background on startup, that way the cache is hopefully populated by the time it gets used.

rubencaro commented 8 years ago

It's annoying even with ~20 projects or less, I'm always waiting that couple of seconds. Any kind of plain cache and this wait could be zero. Huge win.