shurcooL / Go-Package-Store

An app that displays updates for the Go packages in your GOPATH.
MIT License
900 stars 29 forks source link

Major refactor to clean up internal code, enable full parallelism. #53

Closed dmitshur closed 8 years ago

dmitshur commented 8 years ago

This is a major refactor that should preserve current behavior, but update internal code significantly.

The four main consequences are:

The general idea behind the refactor is similar to the related project https://github.com/shurcooL/gostatus/pull/27.

Depends on https://github.com/google/go-github/pull/255 being merged to avoid data races, but they're harmless (the value under a data race is not being used), so not blocking.

dmitshur commented 8 years ago

I'm going to merge this now.

I've been testing the new version locally, and everything seems to be functional and stable, I have not caught any regressions.

There are still some TODOs scattered in the code, they are mostly about cleaning up and better organizing the code; all the functionally important and correctness-critical TODOs have been resolved by now.

I will continue to work on addressing the remaining style and code organization issues, but that shouldn't block this otherwise incredible performance and code simplification improvement PR from being merged.

I know some people have commented that Go Package Store was slow, and it truly was. After this change, it's incredibly fast, as it should be. This is all a result of simplifying the code and doing the parallel pipeline processing right. And no more gists; I was finally able to get rid of those pesky things. :) Time to :ship: it!