Hello everyone,
After further investigating I have found that the problem is in the back-end.
Every time a REST response of an
Item object is returned, there are calls to
ItemService#getMetadata method, which then calls
RelationshipService#getRelationshipMetadata.
This last method will query the database for all metadata in the
relation schema related to the item.
I tried creating my own
Projetcion class and adding
metadata.hidden.relation.isPublicationOfOrgUnit = true in local.cfg.
In both cases the relation metadata is successfully omitted from the REST response, however the method calls above still occurs, causing the slow response of the pages.
I don't see any way to overcome this problem.
Does anyone have a DSpace (7.6x or 8.x) instance with entities and many relationships facing this issue?