[PR #906] [MERGED] Lazily allocate storage for ProcessInlinesBegin/End delegates on Blocks #1304

Closed
opened 2026-01-29 14:52:55 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/906
Author: @MihaZupan
Created: 10/20/2025
Status: Merged
Merged: 10/21/2025
Merged by: @xoofx

Base: masterHead: block-delegates2


📝 Commits (1)

  • db3baa9 Lazily allocate ProcessInlinesBegin/End delegates on Blocks

📊 Changes

7 files changed (+32 additions, -18 deletions)

View changed files

📝 src/Markdig/Extensions/Abbreviations/AbbreviationParser.cs (+0 -2)
📝 src/Markdig/Extensions/AutoIdentifiers/AutoIdentifierExtension.cs (+0 -1)
📝 src/Markdig/Extensions/Footnotes/FootnoteParser.cs (+0 -3)
📝 src/Markdig/Extensions/SmartyPants/SmartyPantsInlineParser.cs (+0 -2)
📝 src/Markdig/Extensions/Tables/PipeTableParser.cs (+1 -4)
📝 src/Markdig/Renderers/RendererBase.cs (+2 -2)
📝 src/Markdig/Syntax/Block.cs (+29 -4)

📄 Description

Reduces parsing allocations by ~2% by reducing the size of each block by 16 bytes.
It does increase the cost when these delegates are used, but that's usually very rare (e.g. only for the top-level MarkdownDocument block).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/xoofx/markdig/pull/906 **Author:** [@MihaZupan](https://github.com/MihaZupan) **Created:** 10/20/2025 **Status:** ✅ Merged **Merged:** 10/21/2025 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `block-delegates2` --- ### 📝 Commits (1) - [`db3baa9`](https://github.com/xoofx/markdig/commit/db3baa9e10d9bd2fbddd96ddae0914107f710215) Lazily allocate ProcessInlinesBegin/End delegates on Blocks ### 📊 Changes **7 files changed** (+32 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig/Extensions/Abbreviations/AbbreviationParser.cs` (+0 -2) 📝 `src/Markdig/Extensions/AutoIdentifiers/AutoIdentifierExtension.cs` (+0 -1) 📝 `src/Markdig/Extensions/Footnotes/FootnoteParser.cs` (+0 -3) 📝 `src/Markdig/Extensions/SmartyPants/SmartyPantsInlineParser.cs` (+0 -2) 📝 `src/Markdig/Extensions/Tables/PipeTableParser.cs` (+1 -4) 📝 `src/Markdig/Renderers/RendererBase.cs` (+2 -2) 📝 `src/Markdig/Syntax/Block.cs` (+29 -4) </details> ### 📄 Description Reduces parsing allocations by ~2% by reducing the size of each block by 16 bytes. It does increase the cost when these delegates are used, but that's usually very rare (e.g. only for the top-level `MarkdownDocument` block). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 14:52:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1304