-
Notifications
You must be signed in to change notification settings - Fork 31
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
Maven Central search results should be cached #263 #453
Maven Central search results should be cached #263 #453
Conversation
Some quick measurements: First request for groupIDs: First request for artifacts [for selected groupID): First request for versions (for selected groupID/artifactID): |
d8ac4c5
to
ff9d063
Compare
@vrubezhny for managing cache, I suggest that you use CacheBuilder from guave. We did that in LemMinx https://github.com/eclipse/lemminx/blob/d808ae7fc32f269ecdd7d737a413ab40e1671873/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/uriresolver/CacheResourcesManager.java#L144 |
I'm still not sure about the probability that the same request gets processed many times in a short time frame. |
It's not only about "the same request":
In any POM of the workspace for the following 15 minutes (changeable). |
ff9d063
to
71b92d7
Compare
The current PR version uses guava Cache and CacheBuilder, however this still needs to be improved in order to not block on waiting for the results to be obtained from Maven Search API. |
...main/java/org/eclipse/lemminx/extensions/maven/searcher/RemoteCentralRepositorySearcher.java
Show resolved
Hide resolved
...main/java/org/eclipse/lemminx/extensions/maven/searcher/RemoteCentralRepositorySearcher.java
Outdated
Show resolved
Hide resolved
...main/java/org/eclipse/lemminx/extensions/maven/searcher/RemoteCentralRepositorySearcher.java
Outdated
Show resolved
Hide resolved
43d48ec
to
205fa40
Compare
205fa40
to
ebbc5db
Compare
Fixes: #263