For repositories that have a large number of communities and collections with associated resource policies and groups, the submission page and select collection step take very long to load. This is especially the case when "special groups" are used. Currently I'm testing with a community-collection tree with 283 communities and 1880 collections.
This has been reported here: https://groups.google.com/forum/#!msg/dspace-tech/tBNckjJ0ocE/x8OdxHtTBwAJ
There are a few problems here:
- The GroupServiceImpl.isMember() function is retrieving all the current users groups over and over again for each linked special group: https://github.com/DSpace/DSpace/blob/dspace-6.0/dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java#L179
- AuthorizeService.isAdmin() does a recursive call on the parent DSpaceObject. But when traversing a community and collection tree, this means that top-level communities and collection are unnecessary checked multiple times for admin rights: https://github.com/DSpace/DSpace/blob/dspace-6.0/dspace-api/src/main/java/org/dspace/authorize/AuthorizeServiceImpl.java#L393
- Hibernate still struggles when loading a lot of objects (Collections, Communites, Resource policies, Groups...) into its cache even though we are not performing any write operations but only read operations.
- Hibernate's Ehcache is not optimally configured so cache the results of queries.