[CDO] Increasing prefetch performance [message #1848138] |
Mon, 22 November 2021 08:24  |
Eclipse User |
|
|
|
Let's say we have a very large tree of CDOResourceFolders and CDOResources. I would like to load this tree in a view with as few client<->server roundtrips as possible. I do not want to load the content of the CDOResources (otherwise, we could simply use the regular prefetching mechanism with infinite depth).
Can I achieve this with a CDORevisionPrefetchingPolicy in combination with a CDOCollectionLoadingPolicy? On the other hand, before I investigate more on this: I read here https://www.eclipse.org/forums/index.php?t=msg&th=1108148&goto=1842003&#msg_1842003 that the CDOCollectionLoadingPolicy should be avoided.
What is the best way to implement the prefetching in this case?
|
|
|
|
|
Re: [CDO] Increasing prefetch performance [message #1848375 is a reply to message #1848274] |
Tue, 30 November 2021 04:39   |
Eclipse User |
|
|
|
The CDORevisionInterner was only recently added as a replacement of CDORevisionAdder, see commit 694c3178f66a66ae6813e0c57b8214fb033e1177. You'd call:revision = revisionManager.getCache().internRevision(revision);
Proper permissions are automatically applied by the server while sending them to the client, see BaseCDORevision.write(CDODataOutput, int, CDOBranchPoint) .
Regarding lock state prefetching as part of revision loading, I've just implemented that: https://bugs.eclipse.org/bugs/show_bug.cgi?id=577319 . See also See InternalCDORevisionManager.prefetchRevisions(CDOID, CDOBranchPoint, int, boolean, Consumer<CDORevision>) .
|
|
|
Re: [CDO] Increasing prefetch performance [message #1848510 is a reply to message #1848375] |
Mon, 06 December 2021 07:50  |
Eclipse User |
|
|
|
This is great stuff, thanks :). The performance is really good now.
A couple of points though if anybody wants to do the same:
* I needed to use InternalCDORevisionManager#getRevisions instead of the revisionInterner, because this seems to be the only way currently to prefetch the lock states
* I needed to add a List<CDOID> to the IQueryContext#addResult. If I added them without the additional List wrapper, then it seems like the Client initiates a server roundtrip for each CDOID that we iterate over the result.
|
|
|
Powered by
FUDForum. Page generated in 0.28092 seconds