[PR #416] Random improvements #1011

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

Original Pull Request: https://github.com/xoofx/markdig/pull/416

State: closed
Merged: Yes


  • Dropping support for net35, net40. Now multi-targeting netstandard2.0, netcoreapp2.1, netcoreapp3.1. 🎉
  • Removed helpers such as ArrayHelper, MethodImplOptionPortable, ExcludeFromCodeCoverage that were needed for framework target compat.
  • Unsealed MarkdownParserContext (@patriksvensson I don't suppose you somehow rely on it being sealed? I figure having it unsealed adds more value)
  • Removed some allocations (b090f24, 84ec832, bdfaa27, 30d0924), 2% overall.
  • Improved codegen for some StringSlice helpers.
  • Used ThrowHelper everywhere, hopefully more things can inline now.
  • Further optimized CharacterMap in 256b4d3. @craigwi while not the reason I did it, this may also workaround the UWP issue.

Overall ~6% parsing throughput increase. Allocation-wise we are now very close to noise-free. The vast majority of allocations are now the AST itself and some strings.

**Original Pull Request:** https://github.com/xoofx/markdig/pull/416 **State:** closed **Merged:** Yes --- - Dropping support for `net35`, `net40`. Now multi-targeting `netstandard2.0`, `netcoreapp2.1,` `netcoreapp3.1`. 🎉 - Removed helpers such as `ArrayHelper`, `MethodImplOptionPortable`, `ExcludeFromCodeCoverage` that were needed for framework target compat. - Unsealed `MarkdownParserContext` (@patriksvensson I don't suppose you somehow rely on it being sealed? I figure having it unsealed adds more value) - Removed some allocations (b090f24, 84ec832, bdfaa27, 30d0924), 2% overall. - Improved codegen for [some StringSlice helpers](https://github.com/lunet-io/markdig/commit/f0830b3237b51e4297bc93ce0954ce80eb24cf15). - Used `ThrowHelper` [everywhere](https://github.com/lunet-io/markdig/commit/a99e65004c1faf7304472829a863f1b55dfe6e38), hopefully more things can inline now. - Further optimized `CharacterMap` in 256b4d3. @craigwi while not the reason I did it, this may also workaround the UWP issue. Overall ~6% parsing throughput increase. Allocation-wise we are now very close to noise-free. The vast majority of allocations are now the AST itself and some strings.
claunia added the pull-request label 2026-01-29 14:48:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1011