[go: up one dir, main page]

Skip to content

Banzai optimization ideas

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

While working on Banzai optimization tasks I discovered several targets in rendering that can be improved

1. EmojiFilter (source link)

It fetches all text nodes, converts them to HTML and replaces found :emoji: strings with images.

Ideas

  • Try to use node.text instead of node.to_html because it is much faster. However, we have to ensure that this change does not break anything.

2. Regex search in reference cache (source link)

We scan html document with regex for different references (issues, merge requests, ...). For large documents (for example, https://gitlab.com/gitlab-org/gitlab/-/blob/master/CHANGELOG.md) the regex search takes significant time.

Ideas

3. Optimize queries to verify reference objects (source link)

We use several WHERE IN (...) queries for fetch merge requests for example. If we have many merge request ids the queries becomes slow. As an alternative we can use INNER JOIN (VALUES (...)) trick.

Implementations

!71947 (closed)


Feel free to update the description with other examples/ideas.

Edited by 🤖 GitLab Bot 🤖