[
https://issues.apache.org/jira/browse/DOXIASITETOOLS-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17620383#comment-17620383
]
John Dimeo commented on DOXIASITETOOLS-268:
-------------------------------------------
[~michael-o] I've created a pull request here: [[DOXIASITETOOLS-268] - Improve
performance by only loading the renderer version once during class
initialization by jdimeo · Pull Request #65 · apache/maven-doxia-sitetools
(github.com)|https://github.com/apache/maven-doxia-sitetools/pull/65]
Similar to what's shown above, but I'm caching the version, not the entire
Properties object (depending on if you think you would need to access other
things in the properties file).
> Don't open version resource file on every call to render
> --------------------------------------------------------
>
> Key: DOXIASITETOOLS-268
> URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-268
> Project: Maven Doxia Sitetools
> Issue Type: Bug
> Components: Site renderer
> Affects Versions: 1.11.1, 2.0.0-M3
> Reporter: John Dimeo
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 2.0.0-M4
>
> Attachments: image-2022-10-19-01-22-06-664.png
>
>
> This is a big performance bug. I have 45,000 Markdown files to render, and it
> takes close to an hour right now in my CI/CD job.
> I realized that on every single rendering file, we are loading a resource:
> InputStream inputStream = DefaultSiteRenderer.class.getResourceAsStream(
> "/META-INF/"
> +
> "maven/org.apache.maven.doxia/doxia-site-renderer/pom.properties" );
> If we only move this to load one time in a static initialization block,
> performance significantly improves.
> Change to DefaultSiteRenderer:
> !image-2022-10-19-01-22-06-664.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)