---
id: change/bcquality/97
type: change
title: "#97 Add per-row AL performance guidance"
summary: New performance guidance documents how to use SetAutoCalcFields for per-row FlowFields and how to avoid cloning records before Modify or Delete in loops, with corrections to the commit checkpoint sample.
tier: official
language: en
tags:
  - feature
  - main
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:12:50.333Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 078b869e3303ccaa59e9836301fe8dbec68c614d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCQuality/pull/97
    title: "microsoft/BCQuality#97: Add per-row AL performance guidance"
    date: "2026-07-14"
    commit: 078b869e3303ccaa59e9836301fe8dbec68c614d
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 97
repo: microsoft/BCQuality
source_id: bcquality-prs
url: https://github.com/microsoft/BCQuality/pull/97
kind: pr
base_branch: main
major: null
merged_at: "2026-07-14T10:51:40Z"
author: JesperSchulz
author_type: User
community_contribution: false
labels: []
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 9
  additions: 174
  deletions: 18
  al: 9
apps: []
objects_touched: []
objects_unjoined:
  - path: microsoft/knowledge/performance/avoid-cloning-records-before-modify-delete-in-loops.bad.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/performance/avoid-cloning-records-before-modify-delete-in-loops.good.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/performance/avoid-cloning-records-before-modify-delete-in-loops.md
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/performance/avoid-commit-inside-loops.good.al
    status: modified
    reason: not-in-snapshot
  - path: microsoft/knowledge/performance/avoid-commit-inside-loops.md
    status: modified
    reason: not-in-snapshot
  - path: microsoft/knowledge/performance/use-setautocalcfields-for-per-row-flowfields.bad.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/performance/use-setautocalcfields-for-per-row-flowfields.good.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/performance/use-setautocalcfields-for-per-row-flowfields.md
    status: added
    reason: not-in-snapshot
  - path: microsoft/skills/review/al-performance-review.md
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items: []
systems:
  - development
  - platform
quote: null
joined_against:
  major: null
  commit: null
---

# #97 Add per-row AL performance guidance

> New performance guidance documents how to use SetAutoCalcFields for per-row FlowFields and how to avoid cloning records before Modify or Delete in loops, with corrections to the commit checkpoint sample.

[Pull request](https://github.com/microsoft/BCQuality/pull/97) · merged into `main` on 2026-07-14 by JesperSchulz · 9 files (+174 -18), 9 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- New guidance and AL samples for using SetAutoCalcFields with per-row FlowFields
- New guidance and samples for avoiding cloning records before Modify or Delete in loops
- Commit-checkpoint sample corrected: selects at most 500 ordered keys into a temporary buffer, then locks and processes only those keys
- Performance review skill gained precise cues for per-row Commit and clone-before-write, with exclusions for valid checkpoints and direct writes
- CalcSums remains the rule for a single filtered-set aggregate

## AL objects touched

- `microsoft/knowledge/performance/avoid-cloning-records-before-modify-delete-in-loops.bad.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/performance/avoid-cloning-records-before-modify-delete-in-loops.good.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/performance/avoid-cloning-records-before-modify-delete-in-loops.md`: added, not in the BC? snapshot yet
- `microsoft/knowledge/performance/avoid-commit-inside-loops.good.al`: modified, not in the BC? snapshot
- `microsoft/knowledge/performance/avoid-commit-inside-loops.md`: modified, not in the BC? snapshot
- `microsoft/knowledge/performance/use-setautocalcfields-for-per-row-flowfields.bad.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/performance/use-setautocalcfields-for-per-row-flowfields.good.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/performance/use-setautocalcfields-for-per-row-flowfields.md`: added, not in the BC? snapshot yet
- `microsoft/skills/review/al-performance-review.md`: modified, not in the BC? snapshot

## Context

- Systems: development, platform

Source: metadata of a merged pull request in microsoft/BCQuality (bcquality): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
