[PR #308] [MERGED] fix emoji performance issue when multiple pipeline needed #930

Open
opened 2026-01-29 14:47:26 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/308
Author: @yishengjin1413
Created: 2/20/2019
Status: Merged
Merged: 2/20/2019
Merged by: @xoofx

Base: masterHead: master


📝 Commits (1)

  • 57784ce fix emoji performance issue when muti pipeline needed

📊 Changes

1 file changed (+38 additions, -42 deletions)

View changed files

📝 src/Markdig/Extensions/Emoji/EmojiParser.cs (+38 -42)

📄 Description

We meet a performance issue when we need to use multiple pipeline. After checking the profiling file and have some local test, I find EmojiParser.Initialize is the problem. At the meantime, we don't need to build the PrefixTree for each instance.

This PR have no logic change, just move the logic to the static constructor.


🔄 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/308 **Author:** [@yishengjin1413](https://github.com/yishengjin1413) **Created:** 2/20/2019 **Status:** ✅ Merged **Merged:** 2/20/2019 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`57784ce`](https://github.com/xoofx/markdig/commit/57784cedc6b65827521b8bcbde005d27debd3df0) fix emoji performance issue when muti pipeline needed ### 📊 Changes **1 file changed** (+38 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig/Extensions/Emoji/EmojiParser.cs` (+38 -42) </details> ### 📄 Description We meet a performance issue when we need to use multiple pipeline. After checking the profiling file and have some local test, I find EmojiParser.Initialize is the problem. At the meantime, we don't need to build the PrefixTree for each instance. This PR have no logic change, just move the logic to the static constructor. --- <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:47:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#930