You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "belingueres (via GitHub)" <gi...@apache.org> on 2026/03/20 01:36:38 UTC
[PR] Issue #625: Improve performance of the file details section in dependencies goal [maven-project-info-reports-plugin]
belingueres opened a new pull request, #627:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/627
Improve performance of the file details section in dependencies goal
Following this checklist to help us incorporate your
contribution quickly and easily:
- [x] Your pull request should address just one issue, without pulling in other changes.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Each commit in the pull request should have a meaningful subject line and body.
Note that commits might be squashed by a maintainer on merge.
- [x] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
This may not always be possible but is a best-practice.
- [x] Run `mvn verify` to make sure basic checks pass.
A more thorough check will be performed on your pull request automatically.
- [x] You have run the integration tests successfully (`mvn -Prun-its verify`).
If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Issue #625: Improve performance of the file details section in dependencies goal [maven-project-info-reports-plugin]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on PR #627:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/627#issuecomment-5743492563
Please follow Hervé's advice above: the local repository is not the place for this cache, and the PR needs to say what problem it solves and at what cost, not only that it is faster. I'd still like to keep the optimisation, since re-analysing 600+ jars on every `site` run is a real cost and the size + mtime check is a sound invalidation rule. What needs to change:
- **Cache location.** Don't write into `<localRepo>/.cache`; Resolver owns that directory and its layout can change under us. Default to `${project.build.directory}/mpir-cache` and expose it as a mojo parameter (`dependencyDetailsCacheDirectory`, `@since 3.9.1`) so users who want it to survive `clean` can point it at a stable path. An empty value should mean "no cache", which keeps today's behaviour reachable.
- **No Jackson.** This plugin has no JSON dependency and one flat record doesn't justify adding `jackson-databind` plus its transitive tree. A `java.util.Properties` file per artifact carries the same fields.
- **Check `v` on read.** `JarDataSummary.VERSION` is written but never compared when loading; a mismatch should fall through to re-analysis.
- **Keep the public API.** `Dependencies` is public in a released artifact. Keep the three-argument constructor (deprecated, delegating with no cache) and keep `getJarDependencyDetails(Artifact)` returning `JarData`; add the summary as a new method rather than changing the return type in a patch release.
The ITs are good and can stay apart from the directory. `pom.xml` conflicts with the `maven-archiver` dependency that landed on master; CI has not run on this branch yet, so the rebase push will be its first run.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Issue #625: Improve performance of the file details section in dependencies goal [maven-project-info-reports-plugin]
Posted by "hboutemy (via GitHub)" <gi...@apache.org>.
hboutemy commented on PR #627:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/627#issuecomment-4529014326
any hint on what is the principle of the update, to ease review?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Issue #625: Improve performance of the file details section in dependencies goal [maven-project-info-reports-plugin]
Posted by "belingueres (via GitHub)" <gi...@apache.org>.
belingueres commented on PR #627:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/627#issuecomment-4529552398
My use case is building Spring Boot based projects, which have a BOM with 600+ dependencies (see [here](https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/4.0.6)).
In my tests, with the use of cache, the time to produce the dependencies goal decreased about half the time it took analyzing the jars.
The location of the cache directory may change, is not required to be in that specific .cache/ directory, it was just a convenient suggestion. The only requirement is that it needs to be in a place that survives between builds.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Issue #625: Improve performance of the file details section in dependencies goal [maven-project-info-reports-plugin]
Posted by "hboutemy (via GitHub)" <gi...@apache.org>.
hboutemy commented on PR #627:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/627#issuecomment-4529290778
you mean: this PR introduces a cache in local repository `.cache/mpir` directory where you store `jar-data.json` files?
I'm not convinced that keeping such a cache in such a location is really a good idea: I'm not even convinced of the need for such optimization
can you precise the problem you are trying to solve?
and the solution, if the problem is really that strong
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Issue #625: Improve performance of the file details section in dependencies goal [maven-project-info-reports-plugin]
Posted by "belingueres (via GitHub)" <gi...@apache.org>.
belingueres commented on PR #627:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/627#issuecomment-4529240828
The principle is that the DependencyRenderer get the jar file statistics ready to render from the JarDataSummary class (which has the contents of the jar-data.json file).
The dependencies.getJarDependencyDetails(artifact) call returns the JarDataSummary object, instead of getting the JarData object and working the needed values from that.
The dependencies.getJarDependencyDetails(artifact) query the cache files (jar-data.json) which contain the required totals needed by the DependencyRenderer). It only analyzes the jar file data if no cache file is found, or if it detects the jar file was modified (the jar-data.json file also saves the .jar file size and last modified timestamp). The json file also has a version number==1 for future changes.
ITs were are a bit tricky. I had to introduce an execution order so that the files are forced to be fully analyzed first (MPIR-625-create-cache). One of the dependencies in the test is a snapshot. Also had to simulate the cache timestamps to be the same of the downloaded mrm repo time, so the setup.groovy file must update the timestamp and file sizes to be the same/different to test reading from cache or re-analyzing the jar file again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Issue #625: Improve performance of the file details section in dependencies goal [maven-project-info-reports-plugin]
Posted by "belingueres (via GitHub)" <gi...@apache.org>.
belingueres commented on PR #627:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/627#issuecomment-5849782602
I think I addressed all issues. Rebased and added some small improvements and tests. Let me know if you want me to squash into one commit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org