Add per-row AL performance guidance (#97)

* Add per-row performance guidance

Document SetAutoCalcFields for per-row FlowFields and direct writes on iterated records, with focused reviewer retrieval cues.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85be3fc4-5253-47b8-ba1b-6b8fd188fcea

* Bound commit checkpoints by key range

Use a capped ordered query to discover each checkpoint watermark before locking and processing only that key range.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85be3fc4-5253-47b8-ba1b-6b8fd188fcea

* Address performance retrieval review

Retrieve Commit-in-loop guidance precisely, process exact checkpoint key lists, and narrow clone-before-write discovery.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85be3fc4-5253-47b8-ba1b-6b8fd188fcea

---------

Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Jesper Schulz-Wedde 2026-07-14 12:51:39 +02:00 committed by GitHub
parent 98af9aa1fc
commit 078b869e33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 174 additions and 18 deletions

View file

@ -0,0 +1,16 @@
codeunit 50490 "Perf AutoCalcFields Good"
{
procedure CollectOverLimitCustomers(var CustomerNos: List of [Code[20]])
var
Customer: Record Customer;
begin
Customer.SetLoadFields("Credit Limit (LCY)");
Customer.SetFilter("Credit Limit (LCY)", '>0');
Customer.SetAutoCalcFields("Balance (LCY)");
if Customer.FindSet() then
repeat
if Customer."Balance (LCY)" > Customer."Credit Limit (LCY)" then
CustomerNos.Add(Customer."No.");
until Customer.Next() = 0;
end;
}