code change · featureAL Developmentofficial - Microsoftreviewed - checked by Opus

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