---
id: change/bcapps/12078
type: change
title: '#12078 [29.x]Reduce allocations in the "Export to Execl" scenario (#11870)'
summary: The Export to Excel scenario now allocates significantly less memory by reusing a CellDecorator instance, eliminating redundant ExcelBuf record calculations, and reducing method call overhead during column processing.
tier: official
language: en
tags:
  - performance
  - releases/29.x
  - bc29
  - codeunit openxml management
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:01:56.344Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: fe31a4253b4aa8fde426364f132f5689d4dfcddf
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/12078
    title: 'microsoft/BCApps#12078: [29.x]Reduce allocations in the "Export to Execl" scenario (#11870)'
    date: "2026-10-07"
    commit: fe31a4253b4aa8fde426364f132f5689d4dfcddf
    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: 12078
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/12078
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-10-07T19:44:33Z"
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:
  - 652103
systems:
  - development
quote: removes three easy allocations that was done for each column of each row
joined_against:
  major: "29"
  commit: 030de38360c4aa828a650300faf93cd09fa139e1
---

# #12078 [29.x]Reduce allocations in the "Export to Execl" scenario (#11870)

> The Export to Excel scenario now allocates significantly less memory by reusing a CellDecorator instance, eliminating redundant ExcelBuf record calculations, and reducing method call overhead during column processing.

[Pull request](https://github.com/microsoft/BCApps/pull/12078) · merged into `releases/29.x` (BC29) on 2026-10-07 by PhDuck · 1 file (+30 -14), 1 AL · performance · tier official · reviewed (checked by Opus)

## What changed

- Reuses the default CellDecorator instead of creating new instances for each column-row combination
- Removes unnecessary ExcelBuf record instantiation that was only used to calculate cell format names
- Reduces AL method call scope allocations during export processing
- Decreases memory allocations from 168GB to 68GB for 100k G/L Entries exports
- Reduces garbage collection pause time from 12.8 seconds to 5.7 seconds in test scenarios

## AL objects touched

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

## Context

- Work items: AB#652103
- 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).
