[ 
https://issues.apache.org/jira/browse/GROOVY-11795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035506#comment-18035506
 ] 

Paul King commented on GROOVY-11795:
------------------------------------

The time is spent walking the CWD:
https://github.com/apache/groovy/blob/master/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovyEngine.java#L1052-L1064

This is designed to find source scripts when the user has entered some start 
imports, e.g. "import my.package.*". I think it would be unusual for this to 
apply to most of the default imports (which it currently does). I'll create a 
PR which removes hitting the problem for star imports starting with "java." and 
"groovy.", but we'll need to do some more testing.


> Let groovysh startup time not depend on contents of CWD
> -------------------------------------------------------
>
>                 Key: GROOVY-11795
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11795
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Groovysh
>    Affects Versions: 5.0.2
>            Reporter: Piotr Zygielo
>            Assignee: Paul King
>            Priority: Minor
>
> As reported on the list: 
> [https://lists.apache.org/thread/0z5g0f7t0hlhm8gn20o4gzyyr795pkp2] - it seems 
> that currently (5.0.2) getting groovysh to be ready with prompt takes more 
> time if the current working directory contains a lot of files.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to