Michael Schwartz created FORGE-2201:
---------------------------------------
Summary: Fetch all Projects is very slow (>2 mins)
Key: FORGE-2201
URL:
https://issues.jboss.org/browse/FORGE-2201
Project: Forge
Issue Type: Enhancement
Components: Addon Development
Affects Versions: 2.13.0.Final
Reporter: Michael Schwartz
Priority: Trivial
I want to fetch all available projects. The following source works as needed but needs at
least 2 mins until completed (about 30 projects):
protected void setupProjects(UIBuilder builder) {
Project entityProject = getSelectedProject(builder.getUIContext());
Resource<?> resource = entityProject.getRoot().getParent();
allProjects = new HashSet<>();
for (Resource<?> res : resource.listResources()) {
DirectoryResource directory = (DirectoryResource) res.reify(DirectoryResource.class);
if (directory != null) {
Project proj = projectFactory.findProject(directory);
if (proj != null) {
allProjects.add(proj);
}
}
}
}
Is there a faster way to iterate through the projects or maybe some initialization can be
done by "lazy loading"?
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)