Agent Schedule Page Pagination Performance

The Agent Schedule page previously loaded all cron rows into memory to compute a count, then re-ran the same query to fetch the displayed page, which caused slow loads on clients with large schedules. A repair loop also ran on every page request. Pagination now uses a lightweight count query and a fresh page fetch. The repair loop has been moved to agent-save time, so paging is a pure read with no repair work.

Problems and fixes

The following root causes were addressed:

Problem Fix
Total record count was computed by loading the entire cron set into memory. Replaced with a dedicated count query that returns a single number.
Page fetch reused the count-query object, forcing a second full materialization. Page fetch is a fresh query with pagination applied directly.
Every page load ran a repair loop over agents and crons, proportional to total cron count. The repair loop was removed from the page-load path and is applied once at agent-save time.

Where the improvement appears

The faster pagination is visible in the following locations:

Location What changed
Agent Schedule page (per client) Pagination loads quickly even with large numbers of scheduled scans.
Server memory pressure The full cron list is no longer materialized on every page request.

Note: No action is required. The improvement is automatic after upgrade.


Copyright © 2026 Virima, Inc. All rights reserved. v6.1