prrrnd / atom-git-projects

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

feature request: cache results #6

Closed mark-hahn closed 9 years ago

mark-hahn commented 9 years ago

I have about 50 projects to open and it takes around 10 seconds which isn't a big deal but a bit annoying.

I know others probably wouldn't benefit so I will do a PR when I get a chance.

prrrnd commented 9 years ago

Great, thanks! I've also been thinking about using the async methods instead of how it is right now. It blocks the UI during those 10 seconds, right?

mark-hahn commented 9 years ago

Yes it blocks. But I can't imagine doing anything else while waiting. The best solution is to never wait. (grin)

The cache could be kept up-to-date in the background and used when needed. So only the cache stuff would need to be async. Actually at this point it isn't a cache. It is the real data.

I'd do this as much for fun as for need.

On Fri, Feb 27, 2015 at 11:17 PM, Pierre Arnaud notifications@github.com wrote:

Great, thanks! I've also been thinking about using the async methods instead of how it is right now. It blocks the UI during those 10 seconds, right?

— Reply to this email directly or view it on GitHub https://github.com/prrrnd/atom-git-projects/issues/6#issuecomment-76515004 .

prrrnd commented 9 years ago

Keeping the projects list up to date in the background by "listening" to the directories in the rootPath sounds like the best possible solution. It would be great if you could come up with a pull request for that! Feel free to assign the issue to yourself if you want to :-)

mark-hahn commented 9 years ago

I can't assign myself. You will need to.

prrrnd commented 9 years ago

Hm, i'm on mobile at the moment. I'll do that when I get back on my computer.

mark-hahn commented 9 years ago

I don't think there are so many issues that assigning owners to issues is that important. (grin)

On Sat, Feb 28, 2015 at 9:16 AM, Pierre Arnaud notifications@github.com wrote:

Hm, i'm on mobile at the moment. I'll do that when I get back on my computer.

— Reply to this email directly or view it on GitHub https://github.com/prrrnd/atom-git-projects/issues/6#issuecomment-76535246 .

mark-hahn commented 9 years ago

FYI: I've started on caching. It is probably going to be a lot of code.

prrrnd commented 9 years ago

You're right about assigning people to issues. Just thought it would be good to keep things in order. I too have OCDs ;-) Looking forward to your PR then, let me know if I can help somehow. I'm quite busy this week though.

mark-hahn commented 9 years ago

I'm not going to do this because I found a major speedup. I will submit a new issue.