Since NXP-7962 Relation are stored using VCS, except for the annotation.
So we still have Jena requests when using annotation or when publishing a document, the VersionEventListener catch DOCUMENT_CHECKEDIN to copy the jena graph.
Here is a stacktrace:
com.hp.hpl.jena.db.DBConnection.getDriver(DBConnection.java:267) com.hp.hpl.jena.db.DBConnection.containsModel(DBConnection.java:195) org.nuxeo.ecm.platform.relations.jena.JenaGraph.openGraph(JenaGraph.java:245) org.nuxeo.ecm.platform.relations.jena.JenaGraph.openGraph(JenaGraph.java:182) org.nuxeo.ecm.platform.relations.jena.JenaGraph.query(JenaGraph.java:900) org.nuxeo.ecm.platform.annotations.service.AnnotationQuery.getAnnotationsForURIs(AnnotationQuery.java:68) org.nuxeo.ecm.platform.annotations.service.AnnotationsServiceImpl.queryAnnotations(AnnotationsServiceImpl.java:177) org.nuxeo.ecm.platform.annotations.proxy.AnnotationServiceProxy.queryAnnotations(AnnotationServiceProxy.java:190) org.nuxeo.ecm.platform.annotations.repository.service.DocumentVersionnedGraphManager.copyGraphFor(DocumentVersionnedGraphManager.java:102) org.nuxeo.ecm.platform.annotations.repository.service.DocumentVersionnedGraphManager.copyGraphFor(DocumentVersionnedGraphManager.java:91) org.nuxeo.ecm.platform.annotations.repository.service.DocumentVersionnedGraphManager.manage(DocumentVersionnedGraphManager.java:78) org.nuxeo.ecm.platform.annotations.repository.service.VersionEventListener.handleEvent(VersionEventListener.java:61) org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:164)
A single JenaGraph.openGraph() submit around 80 SQL queries like:
SELECT S.Subj, S.Prop, S.Obj FROM jena_sys_stmt S WHERE S.Subj = $1 AND S.Prop = $2 AND S.GraphID = $3
Even if they are very fast this high number of SQL queries affect the network latencies.