Expand my Community achievements bar.

SOLVED

I am retrieving data from a node in JCR, which of these are more performatic?

Avatar

Level 2

1. To create a java object that has a property holdign the node wehre the properties are stored and then the getter will get the value from the node strucutre?

2. or create the object while retrieving all the data from node, and then when getter is triggered it get values directly from java object

Is there any performance difference?

THnaks.                

1 Accepted Solution

Avatar

Correct answer by
Level 2

I would suggest go with Option 2. it holds the data in your object and avoids traversing the repository every time you call your get method.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

I would suggest go with Option 2. it holds the data in your object and avoids traversing the repository every time you call your get method.