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

Download java sources lazily #979

Closed
fbricon opened this issue Apr 4, 2019 · 1 comment
Closed

Download java sources lazily #979

fbricon opened this issue Apr 4, 2019 · 1 comment

Comments

@fbricon
Copy link
Contributor

fbricon commented Apr 4, 2019

As described in #824 (comment), eagerly downloading sources causes serious performance issues when working with large projects.
@snjeza prototyped lazily downloading sources in SourceContentProvider, as described in

8 - Java LS downloads all maven sources artifacts. Che 7 uses an empty maven repository when importing a project. I have added a feature that enables downloading a source code when it is required.

This is a good starting point but we need to address a couple points:

  • SourceContentProvider should be decoupled from m2e, so we could probably either introduce a new extension point to hide the source download mechanism or bind it to the generic IBuildSupport
  • Sources were eagerly downloaded to provide a good UX when hovering over 3rd party classes. So the lazily download should also be triggered on hover to maintain a close behavior.
@fbricon
Copy link
Contributor Author

fbricon commented Apr 4, 2019

Best place to lazily trigger source download on hover would be in HoverInfoProvider IMHO. Need to check that element.getOpenable().getBuffer() == null and we have already tried to perform a download (so attempts should be cached/recorded)

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

No branches or pull requests

2 participants