MAS 9.2 series guide
We ran every step on our test system, on the MAS 9.2 series, on a page of our Components Explorer, and read the requests in the browser. The numbers belong to our system and our network. The shape behind them is what you can take along.
The page size you declare, and the one that is sent#
<maximo-datasource id="fs_d_page_narrow" object-structure="mxapiwodetail"
where="siteid="BEDFORD"" order-by="wonum" page-size="20" selection-mode="none">
<schema id="fs_d_page_narrow_s">
<attribute name="wonum" unique-id="true" id="fs_d_page_narrow_a_wonum"/>
<attribute name="description" id="fs_d_page_narrow_a_description"/>
<attribute name="status" id="fs_d_page_narrow_a_status"/>
<attribute name="wopriority" id="fs_d_page_narrow_a_wopriority"/>
</schema>
</maximo-datasource>When the page opened, this datasource sent one request. It asked for 40 rows:
oslc.select=wonum,description,status,wopriority
oslc.where=siteid="BEDFORD"
oslc.orderBy=+wonum
oslc.pageSize=40
collectioncount=1The list showed 20 rows, as declared. The datasource held 20 more in reserve. We saw the same on every small page size of our pages:
page-size in the markup | oslc.pageSize in the request |
|---|---|
| 1 | 1 |
| 3 | 6 |
| 5 | 10 |
| 10 | 20 |
| 20 | 40 |
| 100 | 100 |
| 500 | 500 |
So a small page is fetched two at a time. Remember this when you read a request in the browser and the number looks wrong.

When a list asks for the next page#
A data-list loads more rows when the user scrolls to its end. We scrolled the list of this page to its end again and again and read the rows and the requests:
| Rows in the datasource | Request |
|---|---|
| 20, when the page opens | 1, for the first 40 rows |
| 40 | none, the rows were in reserve |
| 60 | 1, with pageno=2, for the next 40 rows |
| 80 | none |
One request serves two screens of rows. The user sees no pause on every second page, and the server gets half as many calls.
Code can ask for the next rows too. loadRange takes the position of the first row and a number of rows:
const ds = this.page.findDatasource('fs_d_page_narrow');
await ds.loadRange(ds.items.length, 20);The first call sent nothing and brought the datasource from 20 to 40 rows. The second call sent the request with pageno=2.
The count of records#
Every request of the datasource carried collectioncount=1. Maximo then counts the records that match and returns the number with the page. It arrives in the state of the datasource as totalCount, and a list shows it with show-count="true": “1483 records”.
The attribute include-counts="false" on a datasource removes the parameter from the request. We compared both forms of the request, three times each, for every page size of the next section. On our system the answer carried the total in both forms, and the times were the same. With 1,483 records the count costs nothing we could measure.
What a request costs#
We took the request of the datasource and sent it with four page sizes, three times each. Then we did the same with a second datasource that has 40 attributes of the same work orders in its schema. The table shows the size of the answer as JSON text and the middle one of the three times:
| Rows | 4 attributes | 40 attributes |
|---|---|---|
| 10 | 3,157 characters · 85 ms | 7,698 characters · 88 ms |
| 40 | 10,342 characters · 85 ms | 24,959 characters · 114 ms |
| 100 | 24,913 characters · 117 ms | 59,824 characters · 219 ms |
| 500 | 122,104 characters · 416 ms | 326,827 characters · 1,308 ms |
Three things stand out.
Up to 40 rows the time stays flat. Ten rows and forty rows of the narrow schema both took 85 milliseconds. A request has a fixed cost, and at this size the fixed cost is all there is. A page of 5 is therefore no faster than a page of 40. It only sends more requests.
Large pages grow faster than their rows. 500 narrow rows took 416 milliseconds, five times the 85 of a small page. 500 wide rows took 1,308 milliseconds, fifteen times as long.
The schema counts as much as the page size. The wide answer is about two and a half times as large as the narrow one at every page size. From 100 rows on it also takes about two to three times as long. The schema is the select list of the request, as the cookbook recipe Add a Field shows, so every attribute you leave out makes every page smaller.
The app adds its own work on top of the request. The line on our page times the whole call in the app, so it reads higher than the table: 173 milliseconds for 100 narrow rows and 507 for 500. In the development preview, the datasource with 40 attributes stayed in the state loading for more than eight seconds after we asked for 500 rows. The bare request took 1.3 seconds.
Changing the page size at runtime#
The page size of the markup is a start value. Code can change it:
ds.updatePageSize(100);
await ds.forceReload();After these two lines the request asked for 100 rows, and the state of the datasource read pageSize = 100 with 100 rows of 1,483.
What we take from the numbers#
| Decision | Our rule |
|---|---|
| The page size of a list | about what two screens show, 20 to 40 |
| A page size below 10 | no gain, the request costs the same |
| A page size of several hundred | only with a narrow schema, and only when the code needs all rows at once |
| The schema of a list | the attributes the list item shows, and the key |
| The schema of a detail page | its own datasource with page-size="1", as wide as the page needs |
| The count | leave it on, the list can show it |
The last two rows work together. A list with four attributes and a detail datasource with forty load forty attributes for one record. A list with forty attributes loads them for every row the user scrolls past.
What to read next#
Loading and Displaying Data shows when a datasource sends its first request. Search and Filtering shows how to narrow 1,483 records to the few a user wants, which is the larger gain in most lists.
IBM documents page-size, include-counts and the other attributes of <maximo-datasource> in the product itself. In the Application Configuration application, open the ? menu and choose Component Documentation.
