---
id: change/bcquality/134
type: change
title: "#134 knowledge(performance): add community rules for performance"
summary: Adds 16 community performance rules for Business Central to BCQuality. Each rule has a markdown explanation and paired bad and good AL examples covering partial records, HTTP calls inside transactions, ChangeCompany use, page and session I/O, number-series batching and database access patterns.
tier: official
language: en
tags:
  - feature
  - main
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:33.570Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 293f9b13e7d132f110bddffb48540c837265c762
evidence:
  - kind: code
    url: https://github.com/microsoft/BCQuality/pull/134
    title: "microsoft/BCQuality#134: knowledge(performance): add community rules for performance"
    date: "2026-08-27"
    commit: 293f9b13e7d132f110bddffb48540c837265c762
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 134
repo: microsoft/BCQuality
source_id: bcquality-prs
url: https://github.com/microsoft/BCQuality/pull/134
kind: pr
base_branch: main
major: null
merged_at: "2026-08-27T12:04:09Z"
author: demiliani
author_type: User
community_contribution: false
labels: []
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 48
  additions: 1229
  deletions: 0
  al: 48
apps: []
objects_touched: []
objects_unjoined:
  - path: community/knowledge/performance/avoid-currpage-update-in-onaftergetrecord.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/avoid-currpage-update-in-onaftergetrecord.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/avoid-currpage-update-in-onaftergetrecord.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/batch-number-series-instead-of-getnextno-per-row.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/batch-number-series-instead-of-getnextno-per-row.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/batch-number-series-instead-of-getnextno-per-row.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/changecompany-in-loop-drops-caches.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/changecompany-in-loop-drops-caches.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/changecompany-in-loop-drops-caches.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/dataaccessintent-readonly-on-analytical-objects.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/dataaccessintent-readonly-on-analytical-objects.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/dataaccessintent-readonly-on-analytical-objects.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/guiallowed-guard-on-pages-used-as-odata.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/guiallowed-guard-on-pages-used-as-odata.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/guiallowed-guard-on-pages-used-as-odata.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/httpclient-inside-write-transaction-holds-locks.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/httpclient-inside-write-transaction-holds-locks.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/httpclient-inside-write-transaction-holds-locks.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/isempty-before-findset-is-extra-round-trip.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/isempty-before-findset-is-extra-round-trip.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/isempty-before-findset-is-extra-round-trip.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/oncompanyopen-subscribers-must-not-do-io.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/oncompanyopen-subscribers-must-not-do-io.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/oncompanyopen-subscribers-must-not-do-io.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/page-background-tasks-for-expensive-cues.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/page-background-tasks-for-expensive-cues.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/page-background-tasks-for-expensive-cues.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/pass-var-record-to-preserve-partial-load-enumerator.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/pass-var-record-to-preserve-partial-load-enumerator.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/pass-var-record-to-preserve-partial-load-enumerator.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/prefer-related-table-over-extension-on-hot-ledgers.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/prefer-related-table-over-extension-on-hot-ledgers.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/prefer-related-table-over-extension-on-hot-ledgers.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/query-results-bypass-primary-key-cache.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/query-results-bypass-primary-key-cache.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/query-results-bypass-primary-key-cache.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/reset-clears-partial-record-selection.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/reset-clears-partial-record-selection.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/reset-clears-partial-record-selection.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/skip-setloadfields-on-write-and-transferfields.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/skip-setloadfields-on-write-and-transferfields.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/skip-setloadfields-on-write-and-transferfields.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/use-dedicated-lookup-pages-not-full-lists.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/use-dedicated-lookup-pages-not-full-lists.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/use-dedicated-lookup-pages-not-full-lists.md
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/validate-on-partial-record-forces-jit.bad.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/validate-on-partial-record-forces-jit.good.al
    status: added
    reason: not-in-snapshot
  - path: community/knowledge/performance/validate-on-partial-record-forces-jit.md
    status: added
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items: []
systems:
  - development
  - platform
quote: null
joined_against:
  major: null
  commit: null
---

# #134 knowledge(performance): add community rules for performance

> Adds 16 community performance rules for Business Central to BCQuality. Each rule has a markdown explanation and paired bad and good AL examples covering partial records, HTTP calls inside transactions, ChangeCompany use, page and session I/O, number-series batching and database access patterns.

[Pull request](https://github.com/microsoft/BCQuality/pull/134) · merged into `main` on 2026-08-27 by demiliani · 48 files (+1229 -0), 48 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- 16 performance rules added, each with a markdown file and bad/good AL samples
- Topics include partial-record loading, deferring HTTP calls out of write transactions, and grouping ChangeCompany per company
- Also covers page background tasks for cues, dedicated lookup pages, DataAccessIntent ReadOnly and OnCompanyOpen I/O
- Guidance only; no product code changes

## AL objects touched

- `community/knowledge/performance/avoid-currpage-update-in-onaftergetrecord.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/avoid-currpage-update-in-onaftergetrecord.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/avoid-currpage-update-in-onaftergetrecord.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/batch-number-series-instead-of-getnextno-per-row.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/batch-number-series-instead-of-getnextno-per-row.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/batch-number-series-instead-of-getnextno-per-row.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/changecompany-in-loop-drops-caches.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/changecompany-in-loop-drops-caches.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/changecompany-in-loop-drops-caches.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/dataaccessintent-readonly-on-analytical-objects.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/dataaccessintent-readonly-on-analytical-objects.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/dataaccessintent-readonly-on-analytical-objects.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/guiallowed-guard-on-pages-used-as-odata.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/guiallowed-guard-on-pages-used-as-odata.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/guiallowed-guard-on-pages-used-as-odata.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/httpclient-inside-write-transaction-holds-locks.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/httpclient-inside-write-transaction-holds-locks.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/httpclient-inside-write-transaction-holds-locks.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/isempty-before-findset-is-extra-round-trip.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/isempty-before-findset-is-extra-round-trip.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/isempty-before-findset-is-extra-round-trip.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/oncompanyopen-subscribers-must-not-do-io.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/oncompanyopen-subscribers-must-not-do-io.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/oncompanyopen-subscribers-must-not-do-io.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/page-background-tasks-for-expensive-cues.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/page-background-tasks-for-expensive-cues.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/page-background-tasks-for-expensive-cues.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/pass-var-record-to-preserve-partial-load-enumerator.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/pass-var-record-to-preserve-partial-load-enumerator.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/pass-var-record-to-preserve-partial-load-enumerator.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/prefer-related-table-over-extension-on-hot-ledgers.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/prefer-related-table-over-extension-on-hot-ledgers.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/prefer-related-table-over-extension-on-hot-ledgers.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/query-results-bypass-primary-key-cache.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/query-results-bypass-primary-key-cache.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/query-results-bypass-primary-key-cache.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/reset-clears-partial-record-selection.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/reset-clears-partial-record-selection.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/reset-clears-partial-record-selection.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/skip-setloadfields-on-write-and-transferfields.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/skip-setloadfields-on-write-and-transferfields.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/skip-setloadfields-on-write-and-transferfields.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/use-dedicated-lookup-pages-not-full-lists.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/use-dedicated-lookup-pages-not-full-lists.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/use-dedicated-lookup-pages-not-full-lists.md`: added, not in the BC? snapshot yet
- `community/knowledge/performance/validate-on-partial-record-forces-jit.bad.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/validate-on-partial-record-forces-jit.good.al`: added, not in the BC? snapshot yet
- `community/knowledge/performance/validate-on-partial-record-forces-jit.md`: added, not in the BC? snapshot yet

## 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).
