cmd/link: loading N packages takes O(N²) time #20578
Closed
Comments
CL https://golang.org/cl/44852 mentions this issue. |
Hmm, how come gobot didn't close this issue when CL https://go-review.googlesource.com/c/44852/ was merged into master as 51711d1. |
Maybe because Github has been having problems today? https://status.github.com/messages |
Ah, gotcha. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There are some deduplication scans in the linker to avoid loading the same package (same import path) multiple times. These use a linear scan over all packages already loaded, so loading N packages takes O(N²) time (even with no duplicates). These scans should be replaced by map checks, cutting the time for N packages to O(N).
I have a CL and will send it.
The text was updated successfully, but these errors were encountered: