Cursor memory issues [message #1712222] |
Thu, 22 October 2015 04:45  |
Eclipse User |
|
|
|
After thorough testing, I've come to the following conclusions. Can anybody confirm these issues ? Or, even better, has a solution or workaround.
- Using a ScrollableCursor to iterate over a large resultSet of entities uses a lot of memory. First of all the Oracle driver holds a reference to each visited row, which is a known feature/bug. But also EclipseLink consumes a lot of memory, for a list of deferredEvents (which can be seen in the heapDump) which only grows over time wile you iterate. Regularly clearing the cursor or the entityManager has no effect on this memory usage.
- Using a CursoredStream to iterate over a large resultSet of entities uses a lot of memory, when you have at least 1 @BatchFetch-annotated relation. From the heapDump I can see a lot of memory consumed by 1 BatchFetchPolicy-object.
For now, our workaround is to iterate with a CursoredStream over Tuples instead of complete (@Batch-Fetch) entities.
|
|
|
|
Re: Cursor memory issues [message #1713178 is a reply to message #1713072] |
Mon, 02 November 2015 00:06  |
Eclipse User |
|
|
|
Hi Chris,
Thanks for your reply.
Our domain-objects our primarly used in a paged UI, therefor their relations are BatchFetch-annotated. Using pagination queries for our batch-jobs (instead of cursors) is too slow because of the count-query that is executed for each page.
I'm not sure what you mean by 'the latest' and 'file it', I'm using EclipseLink 2.6.1 for the moment...
Kind regards,
Steven
|
|
|
Powered by
FUDForum. Page generated in 0.03900 seconds