ObjectDB ObjectDB

objectdb.java.util.ArrayList and performance

#1

Hello guys,

i have a question regarding "objectdb.java.util.ArrayList" and performance.

In my project i'm iterating over an array with about 100k items. Fetching them into the EntityManager takes about 120ms, but when i'm iterating over all of them (this is a tree structure, each of them has a parent and some childs) it takes about 70 seconds. Doing the same iteration with items that are not loaded from ObjectDB (with pure POJOs) takes about 400ms.

When running JProfiler the bottleneck must be somewhere in "objectdb.java.util.ArrayList", because "objectdb.java.util.ArrayList.size" takes about 37 seconds and "objectdb.java.util.ArrayList.iterator" takes about 33 seconds doing this iteration.

Can anybody give me a hint whats the reason or how i can increase performance here?

edit
delete
#2

This issue can be closed, just after posting this question i found the problem. A lazy loaded relationship was not fetched, which was accessed when iterating over the list.

edit
delete

Reply

To post on this website please sign in.