---
id: change/bcapps/11870
type: change
title: '#11870 Reduce allocations in the "Export to Execl" scenario'
summary: The Export to Excel scenario now allocates less memory by reusing objects instead of creating new ones for each cell, reducing garbage collection pressure in production.
tier: official
language: en
tags:
  - performance
  - main
  - bc30
  - codeunit openxml management
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:03:35.613Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: e96e8444657d1fed08bd4d9d6a2091948b564ca5
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11870
    title: 'microsoft/BCApps#11870: Reduce allocations in the "Export to Execl" scenario'
    date: "2026-09-28"
    commit: e96e8444657d1fed08bd4d9d6a2091948b564ca5
    t: null
    quote: removes three easy allocations that was done for each column of each row
links:
  learn: []
  objects:
    - object/codeunit/6223
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11870
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11870
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-28T14:54:35Z"
author: PhDuck
author_type: User
community_contribution: false
labels:
  - "Team: Integrations"
change_class: code
change_kind: performance
behavior_change: false
breaking: false
files:
  count: 1
  additions: 30
  deletions: 14
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/6223
    page: codeunit/6223
    type: codeunit
    id: 6223
    name: OpenXML Management
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 651523
systems:
  - development
quote: removes three easy allocations that was done for each column of each row
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #11870 Reduce allocations in the "Export to Execl" scenario

> The Export to Excel scenario now allocates less memory by reusing objects instead of creating new ones for each cell, reducing garbage collection pressure in production.

[Pull request](https://github.com/microsoft/BCApps/pull/11870) · merged into `main` (BC30) on 2026-09-28 by PhDuck · 1 file (+30 -14), 1 AL · performance · tier official · reviewed (checked by Opus)

## What changed

- Reuse CellDecorator object instead of creating a new one per column
- Avoid allocating ExcelBuf record for cell format name calculations
- Eliminate method scope allocations by inlining AL method call
- Reduces allocations from 168GB to 68GB for 100k G/L Entries export
- Cuts garbage collection pause time from 12.8 seconds to 5.7 seconds

## AL objects touched

- [Codeunit 6223 "OpenXML Management"](../../objects/codeunit/6223.md), Base Application: modified

## Context

- Work items: AB#651523
- Labels: Team: Integrations
- Systems: development
- From the description: "removes three easy allocations that was done for each column of each row"

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