[ 
http://jira.codehaus.org/browse/JXR-59?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Herve Boutemy updated JXR-59:
-----------------------------

    Description: 
The method AbstractJxrReport.hasSources( File dir ) spends a lot of time 
scanning .svn directories when I do my build.  

If you replace the line,

{code:java}else if ( currentFile.isDirectory() ){code}

with the lines

{code:java}else if ( currentFile.isDirectory()  &&
             Character.isJavaIdentifierStart(currentFile.getName().charAt(0))
){code}

You will speed this up.

If the first character in the directory is not a valid java identifier start, 
then the directory cannot contain java code.  '.' is not a valid java 
identifier start, so .svn directories are ignored when scanning for sources.



  was:
The method AbstractJxrReport.hasSources( File dir ) spends a lot of time 
scanning .svn directories when I do my build.  

If you replace the line,

else if ( currentFile.isDirectory() )

with the lines

else if ( currentFile.isDirectory()  &&
             Character.isJavaIdentifierStart(currentFile.getName().charAt(0))
)

You will speed this up.

If the first character in the directory is not a valid java identifier start, 
then the directory cannot contain java code.  '.' is not a valid java 
identifier start, so .svn directories are ignored when scanning for sources.




> speed up AbstractJxrReport.hasSources()
> ---------------------------------------
>
>                 Key: JXR-59
>                 URL: http://jira.codehaus.org/browse/JXR-59
>             Project: Maven JXR
>          Issue Type: Improvement
>          Components: maven2 jxr plugin
>    Affects Versions: 2.1
>            Reporter: Sean Bridges
>            Priority: Minor
>
> The method AbstractJxrReport.hasSources( File dir ) spends a lot of time 
> scanning .svn directories when I do my build.  
> If you replace the line,
> {code:java}else if ( currentFile.isDirectory() ){code}
> with the lines
> {code:java}else if ( currentFile.isDirectory()  &&
>              Character.isJavaIdentifierStart(currentFile.getName().charAt(0))
> ){code}
> You will speed this up.
> If the first character in the directory is not a valid java identifier start, 
> then the directory cannot contain java code.  '.' is not a valid java 
> identifier start, so .svn directories are ignored when scanning for sources.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to