cancel
Showing results for 
Search instead for 
Did you mean: 

ICollection.getChildren() with pagination

Former Member
0 Kudos

Hello all

I'm developing an applicattion and have a lot of resources in a collection. I need to list them and to do that I use the ICollection.getChildren(). Now it all works fine, but I'm a bit worried of the performance in the future because the number of resources is planned to grow and grow.

Is there any way to obtain a limited number of children within a Collection?. For example, from 1 to 20, from 21 to 40, etc...

If not, what are the alternatives to implement this correctly? Am I wrong thinking that using ICollection.getChildren() on a Collection that has 1000 resources is going to be slow or consume a lot of unnecessary memory?

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

At last I have achieved this using a recursive method and forgetting about the TREX.

Former Member
0 Kudos

Yes, you are right. Big collections aren't going to perform well.

The only currently available workaround is not to make them big, for instance by introducing additional layers of collections.

Best regards, Julian

Former Member
0 Kudos

Thanks Julian.

I have another question then. For example, imagine that what I am storing are news. A possible way to implement this is by using the creation day as an additional layer of collection:

/news/

2007/

01/

20/

new1

21/

new2

new3

....

If I had to show the 5 last news, what options do I have? The only one that comes to my mind is making a search ordered by date. But I don't like the idea of searching for something that I know where it is.

Thanks in advance.

Former Member
0 Kudos

Hi,

Maybe you can use a command "SeeLast5News", in which you can control the behavior..

Former Member
0 Kudos

That only controls the UI, but not the underlying repository framework.