aspose file tools*
The moose likes Java in General and the fly likes Sublisting large list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Sublisting large list" Watch "Sublisting large list" New topic
Author

Sublisting large list

chets patel
Ranch Hand

Joined: Apr 27, 2010
Posts: 77

Hi All,
I have a list of having more than 2000 records. I want to get sublist of the same. But it is very slow. Is there any other way I can get the sublist of the large list.
Please help.

Thanks in advance.
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2267
    
    3

Please TellTheDetails. Is this list ordered already? What are these "records"? Are these objects too complex? What is the filter for this sublist?


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39828
    
  28
2000 is not a large list. It should take a few μs to get a sublist.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

Please show us how you create this sub list. If that's slow then perhaps you're doing it in a less efficient way.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

chets patel wrote:Is there any other way I can get the sublist of the large list.


There are many ways. If the way you're using is to slow, then you should use a different way.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sublisting large list