Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packages.Load slows *everything* down even though it is in a separate thread (go mod mode) #150

Closed
rcoreilly opened this issue Feb 15, 2020 · 4 comments

Comments

@rcoreilly
Copy link
Contributor

editing has become very jerky, when adding new lines -- the root cause seems to be from packages.Load -- here's a relevant ticket:

golang/go#29427

I just switched code back to previous GoSrcDir for GOPATH mode and it is now smooth again..

This should all be on a separate go routine so not clear why it is affecting performance so much -- I'll investigate..

@rcoreilly rcoreilly changed the title argh: packages.Load is really slow argh: packages.Load is causing jerky new-line level editing Feb 15, 2020
@rcoreilly
Copy link
Contributor Author

current status: using delayed markup for everything greatly reduces, but does not eliminate, this issue. is it GC? need to add some additional diagnostics so can file a ticket with tools.

@rcoreilly rcoreilly changed the title argh: packages.Load is causing jerky new-line level editing packages.Load slows *everything* down even though it is in a separate thread (go mod mode) Apr 6, 2020
@rcoreilly
Copy link
Contributor Author

Looks like something is kinda broken here also -- can't seem to find dependencies in wwi3d in go mod mode -- needs a significant revisit.

@rcoreilly
Copy link
Contributor Author

Here's some useful info about why packages.Load is so slow: golang/go#31087 (comment)

And example using golang.org/x/tools/mod/module instead -- the tricky issue here is of course finding the versions.

Just realized the best way to deal with this is to just create our own internal cache of path names! The first time you hit packages.Load it will be slow, but after that, it will be fast..

@rcoreilly
Copy link
Contributor Author

yeah that fixes it! modules mode now works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant