`Out-UDTableData` Takes ~2 Seconds for Two Rows

`Out-UDTableData` Takes ~2 Seconds for Two Rows

avatar

# PowerShell Universal Support Bug: `Out-UDTableData` Takes ~2 Seconds for Two Rows

## Summary

A `New-UDTable -LoadData` callback takes about **2 seconds** to return a page containing only **two records**. Timing traces isolate nearly all of the delay to the call to `Out-UDTableData`.

## Environment

- PowerShell Universal: version not recorded
- PowerShell: version not recorded
- Deployment: Windows development environment
- App route: `/iisapplicationname/dashboard/jSourceAssistant/Cases`
- Date: 2026-10-23, server-local time

## Observed Result

A live search callback processed 163 cached source rows and returned two matching rows:

| Stage | Time / value |
| --- | ---: |
| Work before `Out-UDTableData` | 7.4 ms |
| Rows passed to formatter | 2 |
| Properties passed | 38 |
| `Out-UDTableData` | 2,025.7 ms |
| Total callback time | 2,033.2 ms |

Sanitized trace from `systemLog20261023.txt`, trace ID `25dcae06`:

```text
[2026-10-23 16:39:45.161] Cases.LoadData.Before.OutUDTableData SearchLength=8 SourceRows=163 MatchingRows=2 ReturnedRows=2 PropertyCount=38 PreOutMs=7.4
[2026-10-23 16:39:47.186] Cases.LoadData.After.OutUDTableData OutUDTableDataMs=2025.7 TotalMs=2033.2
```

The search text is not included in the trace.

## Current Call Pattern

The callback currently pipes the page rows to the formatter:

```powershell
$tablePayload = $pageRows | Out-UDTableData `
-Page $tablePage `
-TotalCount $totalCount `
-Properties $tableProperties
```

At the time of the trace, `$pageRows.Count` and `$totalCount` were both `2`, and `$tableProperties.Count` was `38`.

## Reproduction

1. Open the Cases page in the development environment.
2. Search for a term that returns exactly two records.
3. Measure the `New-UDTable -LoadData` callback around `Out-UDTableData`.

The callback filters a cached row set; it does not query SQL for each search keystroke.

## Expected Result

Returning two page rows should not add a multi-second delay in the table-data formatting call. Please confirm whether this duration is expected and whether `Out-UDTableData` has known performance limits or recommended input patterns for this use.

## Request for Support

Please investigate why `Out-UDTableData` takes approximately 2 seconds for two rows and 38 properties in a `New-UDTable -LoadData` callback. Please advise whether this is a known issue, and what additional diagnostic data or profiling method would help identify the cause.

## Related Observation

Other traces on the same page measured approximately 5.9–16.0 seconds in `Out-UDTableData` when the callback returned 12 rows. This suggests the delay is in or below the formatter call, rather than in the local search/filter operation.

## Additional Details to Add Before Submission

- Exact PSU version/build
- PowerShell version
- Browser and version
- Whether the issue reproduces in a minimal `New-UDTable -LoadData` page with synthetic rows

All Comments (0)