# Bug OP-19223 - Performance impact of large Markdown/HTML templates caused by the tagfilter GFM extension

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-19223

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Text editor |
| Target versions | 17.3.2 |
| Observed in versions |  |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Oliver Günther |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

We already use our own extensive sanitization pipeline, and it turns out tagfilter is extremely slow on large oneline input (such as big tables).

Rendering a 1.5MB work package description (single ~41k-tag HTML blob produced by CKEditor) through OpenProject::TextFormatting::Renderer took ~147s. Profiling each HTML::Pipeline filter showed MarkdownFilter alone was 98+% of the total runtime (~145s); every other filter combined was ~2s.

CommonMarker call profile:

*   With tagfilter: 142,392 ms
    
*   Without tagfilter: &lt; 5 ms
