[PR #3591] [CLOSED] Move default highlight.js highlighting into a web worker #17010

Closed
opened 2025-11-02 12:24:10 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3591
Author: @stevenday
Created: 2/27/2018
Status: Closed

Base: masterHead: highlight-js-web-worker


📝 Commits (4)

  • 47bdcfe Move default highlight.js highlighting into a web worker
  • 0d5afc2 fixup! Move default highlight.js highlighting into a web worker
  • 65605cd fixup! Move default highlight.js highlighting into a web worker
  • 7c2cc02 fixup! Move default highlight.js highlighting into a web worker

📊 Changes

2 files changed (+18 additions, -1 deletions)

View changed files

public/js/highlight-worker.js (+10 -0)
📝 public/js/index.js (+8 -1)

📄 Description

Hi,

We noticed that pages served by gitea locked up when viewing large files, which I tracked down to (mainly) the syntax highlighting javascript. Highlight.js have an example on their docs of moving the actual highlighting to a web worker so that it doesn't block the rest of the page, and this seems to be a big improvement for us so I thought I'd see whether it would be interesting to you.

There are a couple of other places where you use highlight js, but they're for specific situations (preview panes etc) where I wasn't so sure this would be desirable. I'd be happy to extend it to those too if needs be.

Thanks!


🔄 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/go-gitea/gitea/pull/3591 **Author:** [@stevenday](https://github.com/stevenday) **Created:** 2/27/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `highlight-js-web-worker` --- ### 📝 Commits (4) - [`47bdcfe`](https://github.com/go-gitea/gitea/commit/47bdcfe4ac08b32c32280bb7d06063f4bf2de253) Move default highlight.js highlighting into a web worker - [`0d5afc2`](https://github.com/go-gitea/gitea/commit/0d5afc22f557cf696a5289b6597f8420a054aebc) fixup! Move default highlight.js highlighting into a web worker - [`65605cd`](https://github.com/go-gitea/gitea/commit/65605cda5986dca618374391aab734476097e27f) fixup! Move default highlight.js highlighting into a web worker - [`7c2cc02`](https://github.com/go-gitea/gitea/commit/7c2cc021ad6cd2091a3436c35ff2f55e4289a8ab) fixup! Move default highlight.js highlighting into a web worker ### 📊 Changes **2 files changed** (+18 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `public/js/highlight-worker.js` (+10 -0) 📝 `public/js/index.js` (+8 -1) </details> ### 📄 Description Hi, We noticed that pages served by gitea locked up when viewing large files, which I tracked down to (mainly) the syntax highlighting javascript. Highlight.js have [an example on their docs](https://highlightjs.org/usage/) of moving the actual highlighting to a web worker so that it doesn't block the rest of the page, and this seems to be a big improvement for us so I thought I'd see whether it would be interesting to you. There are a couple of other places where you use highlight js, but they're for specific situations (preview panes etc) where I wasn't so sure this would be desirable. I'd be happy to extend it to those too if needs be. Thanks! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:24:10 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17010