Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2201

Fetch all Projects is very slow (>2 mins)

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Do
    • Trivial
    • None
    • 2.13.0.Final
    • Addon Development
    • None

    Description

      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"?

      Attachments

        Activity

          People

            Unassigned Unassigned
            mikes2221 Michael Schwartz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: