You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/09/03 03:35:00 UTC
[jira] [Commented] (DOXIASITETOOLS-344) Improve performance of case-sensitive file key checking
[ https://issues.apache.org/jira/browse/DOXIASITETOOLS-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17878698#comment-17878698 ]
ASF GitHub Bot commented on DOXIASITETOOLS-344:
-----------------------------------------------
jdimeo opened a new pull request, #170:
URL: https://github.com/apache/maven-doxia-sitetools/pull/170
Our Maven site now has about 150,000 Doxia files to render (mostly Markdown and some ASCII doc). During profiling, I realized the Maven site plugin was spending around 18 minutes in the addModuleFiles() method. When looking at the code, I realized the algorithm was O(n² - n / 2) the way it adds each file it discovers to a map and the iterates through the map for each file.
This approach uses a secondary hash map to achieve O(2n) instead to check for a case-insensitive duplicate file to error on Windows and warn on other OSes.
(second attempt starting with the latest `master` branch and adding the ticket to the commit)
> Improve performance of case-sensitive file key checking
> -------------------------------------------------------
>
> Key: DOXIASITETOOLS-344
> URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-344
> Project: Maven Doxia Sitetools
> Issue Type: Improvement
> Components: Site renderer
> Affects Versions: 2.0.0-M19
> Reporter: John Dimeo
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 2.0.0
>
>
> Our Maven site now has about 150,000 Doxia files to render (mostly Markdown and some ASCII doc). During profiling, I realized the Maven site plugin was spending around 18 minutes in the {{addModuleFiles()}} method. When looking at the code, I realized the algorithm was *O(n² - n / 2)* the way it adds each file it discovers to a map and the iterates through the map for each file.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)