We are experiencing the same issue. Did you find any solution/workaround to this performance issue ?
I encountered this as well, using SQL Server. It is very chatty with the number of queries it issues ., especially starting up. I found it worked best to keep the mode shape instance and database instance in the same data center . I ended up running modeshape In docker images in DC/OS and the database sever within same data center . In general, if there are lots of trips to the database , minimize the network latency and maximize the bandwidth between them. I’m unaware of modeshape optimizations that could be applied .
Thank you for sharing yor feedback on this.
We did some profiling using a very simple configuration where the modeshape instance and the persistence database are hosted on the same server. We still get very bad performance results. According to the profiling sessions, it's dut to the fact that Modeshape is loading nodes one by one from the persistence layer, triggering many individual sql requests for each node that need to be evaluated instead of loading nodes in batches.
I did not find any optimization that could be done either. I guess that it would require Modeshape to load nodes in batches from the underlying persistence layer, but I'm not sure that it is an "easy" change. Maybe a Modeshape developper feedback on this could help ?