[GH-ISSUE #3334] Browser freezes ocasionally when generating bigger code #13227

Closed
opened 2026-04-19 20:02:00 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @Fusseldieb on GitHub (Jun 20, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/3334

Bug Report

Description

Bug Summary:
When generating code with GPT-4o, it looks like it generates so fast that it sometimes can't keep up with the syntax highlighting, locks up and freezes the browser for half a minute. This does only happen ocasionally, but is very annoying when it does.

See additional information.

Steps to Reproduce:

  • Ask GPT-4o to generate some big code with 100+ lines, and eventually it freezes when streaming code completions.

Expected Behavior:

  • ... Not to freeze

Actual Behavior:

  • ... It freezes!

Environment

  • Open WebUI Version: 0.3.5

  • Ollama (if applicable): -

  • Operating System: Debian

  • Browser (if applicable): Edge 125.0 x64

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
-

Docker Container Logs:
-

Screenshots (if applicable):
-

Installation Method

Managed under a docker container, installed like recommended instructions.

Additional Information

It looks like it only happens while code highlighting. You can actually see it getting progressively slower and outputting 3-4 lines at once, and eventually the browser can't keep up and freezes for some seconds. Sometimes it even gets to the "Wait for the page?" dialog, where you can wait and it eventually recovers.

However, there are times when it's getting slower and slower, and then the code ends, and it IMMEDIATELY springs back to normal speed, what leads me to believe it has do to with code highlighting.

Maybe triggering the code highlighting too often/too fast?

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @Fusseldieb on GitHub (Jun 20, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/3334 # Bug Report ## Description **Bug Summary:** When generating code with GPT-4o, it looks like it generates so fast that it sometimes can't keep up with the syntax highlighting, locks up and freezes the browser for half a minute. This does only happen ocasionally, but is very annoying when it does. See additional information. **Steps to Reproduce:** - Ask GPT-4o to generate some big code with 100+ lines, and eventually it freezes when streaming code completions. **Expected Behavior:** - ... Not to freeze **Actual Behavior:** - ... It freezes! ## Environment - **Open WebUI Version:** 0.3.5 - **Ollama (if applicable):** \- - **Operating System:** Debian - **Browser (if applicable):** Edge 125.0 x64 ## Reproduction Details **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** \- **Docker Container Logs:** \- **Screenshots (if applicable):** \- ## Installation Method Managed under a docker container, installed like recommended instructions. ## Additional Information It looks like it only happens while code highlighting. You can actually see it getting progressively slower and outputting 3-4 lines at once, and eventually the browser can't keep up and freezes for some seconds. Sometimes it even gets to the "Wait for the page?" dialog, where you can wait and it eventually recovers. However, there are times when it's getting slower and slower, **and then the code ends**, and it IMMEDIATELY springs back to normal speed, what leads me to believe it has do to with code highlighting. Maybe triggering the code highlighting too often/too fast? ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@morgendigital commented on GitHub (Jun 20, 2024):

+1, we see similar issues, exactly as you described.

<!-- gh-comment-id:2181250233 --> @morgendigital commented on GitHub (Jun 20, 2024): +1, we see similar issues, exactly as you described.
Author
Owner

@tjbck commented on GitHub (Jun 20, 2024):

Just pushed an optimisation refac for code block in latest dev, I'd greatly appreciate if you could test it out and see if that did anything for you! 🙌

<!-- gh-comment-id:2181385521 --> @tjbck commented on GitHub (Jun 20, 2024): Just pushed an optimisation refac for code block in latest dev, I'd greatly appreciate if you could test it out and see if that did anything for you! 🙌
Author
Owner

@morgendigital commented on GitHub (Jun 21, 2024):

@tjbck works much better now, no hanging at all for me - thank you for the quick fix!

<!-- gh-comment-id:2182816718 --> @morgendigital commented on GitHub (Jun 21, 2024): @tjbck works much better now, no hanging at all for me - thank you for the quick fix!
Author
Owner

@AdyTech99 commented on GitHub (Nov 7, 2024):

Just pushed an optimisation refac for code block in latest dev, I'd greatly appreciate if you could test it out and see if that did anything for you! 🙌

Is this ever going to come out in the release?

<!-- gh-comment-id:2461678675 --> @AdyTech99 commented on GitHub (Nov 7, 2024): > Just pushed an optimisation refac for code block in latest dev, I'd greatly appreciate if you could test it out and see if that did anything for you! 🙌 Is this ever going to come out in the release?
Author
Owner

@Fusseldieb commented on GitHub (Nov 7, 2024):

@AdyTech99 It has improved for several versions now. Are you on the latest?

<!-- gh-comment-id:2461953719 --> @Fusseldieb commented on GitHub (Nov 7, 2024): @AdyTech99 It has improved for several versions now. Are you on the latest?
Author
Owner

@AdyTech99 commented on GitHub (Nov 7, 2024):

@Fusseldieb Yes, 0.3.35. I'm on Safari, so maybe it's a browser problem? Safari does tend to lag on large webpages

<!-- gh-comment-id:2462026641 --> @AdyTech99 commented on GitHub (Nov 7, 2024): @Fusseldieb Yes, 0.3.35. I'm on Safari, so maybe it's a browser problem? Safari does tend to lag on large webpages
Author
Owner

@Fusseldieb commented on GitHub (Nov 7, 2024):

@AdyTech99 Very large code still lags here and then, but things have definitively changed.

<!-- gh-comment-id:2462142487 --> @Fusseldieb commented on GitHub (Nov 7, 2024): @AdyTech99 Very large code still lags here and then, but things have definitively changed.
Author
Owner

@gaby commented on GitHub (Mar 20, 2025):

Having same issue. OpenWebUI takes over a minute to render code sent back by the gpu

<!-- gh-comment-id:2739105666 --> @gaby commented on GitHub (Mar 20, 2025): Having same issue. OpenWebUI takes over a minute to render code sent back by the gpu
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#13227