Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WINDUP-1724 Reduce list {source,target,tag} commands execution time #1215

Merged
merged 2 commits into from Oct 31, 2017

Conversation

mrizzi
Copy link
Member

@mrizzi mrizzi commented Oct 30, 2017

On average, an execution of RHAMT CLI with one of the following flags --listTags, --listSourceTechnologies or--listTargetTechnologies tooks about 5 seconds to execute.
In this 5 seconds, about 1.5-2 seconds are spent in a for loop in XMLRuleProviderLoader due to loading of more than 100 rules files, each taking between 15-20 milliseconds.
The remaining 3 seconds are spent for starting and then shutting down Furnace and scanning the classpath for all Java addons.
With the changes in this PR, the sources/targets/tags are not retrieved from rules anymore but they're read from the help.xml file with the result that running every command now take only 3 seconds (sometimes just 2) that is the minimum time for booting Furnace and then turn it off.

@jsight
Copy link
Member

jsight commented Oct 30, 2017

Hmm, why does it still have to boot Furnace?

@mrizzi
Copy link
Member Author

mrizzi commented Oct 30, 2017

Commit 8d62b1c:

  • changes List{SourceTechnologies,TargetTechnologies,Tags}Command execution phase from CommandPhase.PRE_EXECUTION to CommandPhase.PRE_CONFIGURATION in order to avoid executing Furnace (@jsight thanks)
  • adds AbstractListCommandWithoutFurnace for commands that display list but do not need Furnace for their executions while the old AbstractListCommand denotes commands that need Furnace to be executed (i.e. DiscoverPackagesCommand & ListAddonsCommand)

With these changes the sources/targets/tags are displayed immediately.

@mrizzi
Copy link
Member Author

mrizzi commented Oct 30, 2017

retest

1 similar comment
@mrizzi
Copy link
Member Author

mrizzi commented Oct 31, 2017

retest

@jsight
Copy link
Member

jsight commented Oct 31, 2017

Oh, nice, it finally passed. :)

Merging...

@jsight jsight merged commit 858a110 into windup:master Oct 31, 2017
jsight pushed a commit that referenced this pull request Oct 31, 2017
…1215)

* WINDUP-1724 Reduce list {source,target,tag} commands execution time

* WINDUP-1724 Reduce list {source,target,tag} commands execution time: enhanced
@mrizzi mrizzi deleted the JIRA_WINDUP-1724 branch October 31, 2017 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants