on 01-21-2007 12:55 PM
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.
At last I have achieved this using a recursive method and forgetting about the TREX.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.