Skip to main content
A newer version of this page is available. .

Pageable Collections

Pageable collections are represented by an XPCursor class. The XPCursor was designed to make the best use of memory and not for speed. The XPCollection reads all the objects that satisfy the specified criteria, and a lot of memory is required to retrieve a lot of objects. The XPCursor works much slower than the XPCollection. It retrieves the first batch of objects more quickly and less memory is required to process all the objects, but it also increases the overall time taken to complete the operation (the exact time depends upon the number of objects and the size of the pages).

The XPCursor splits all the objects into pages and works with one page at a time. The maximum number of objects that can be contained in a single page is specified by the XPCursor.PageSize value. The XPCursor is useful if you want to iterate through a lot of objects (more than 10 000) and perform an action on each of them.

You can also use the XPPageSelector component to split all the objects within the XPCollection into several pages, and then process the objects in several threads simultaneously.