code change · performanceInventoryofficial - Microsoftreviewed - checked by Opus

#9745 [main] Implement item variant caching in calculate inventory

The Calculate Inventory report now caches item variant information to reduce redundant database lookups when processing multiple records with the same variants.

Pull request · merged into main (BC30) on 2026-07-30 by JakovljevicDusan · 2 files (+160 -32), 2 AL · performance · tier official · reviewed (checked by Opus)

What changed

  • Item variant existence and blocked state are cached in a dictionary during calculation
  • Reduces repeated NST data cache checks and SQL queries for the same variants
  • Improves performance in scenarios where many records share the same variants
  • Dictionary approach eliminates NST cache maintenance overhead

AL objects touched

  • Report 790 “Calculate Inventory”, Base Application: modified
  • src/Layers/RU/BaseApp/Inventory/Counting/Journal/CalculateInventory.Report.al: modified, not in the BC30 snapshot

Context

  • Work items: AB#643995
  • Labels: Team: SCM
  • Systems: inventory
  • From the description: “Caches processed Item Variants in the dictionary: whether Item Variants exists and Blocked state.”

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