Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser freezes ocasionally when generating bigger code #3334

Closed
4 tasks done
Fusseldieb opened this issue Jun 20, 2024 · 3 comments
Closed
4 tasks done

Browser freezes ocasionally when generating bigger code #3334

Fusseldieb opened this issue Jun 20, 2024 · 3 comments

Comments

@Fusseldieb
Copy link
Contributor

Fusseldieb commented Jun 20, 2024

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!

@morgendigital
Copy link

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

@tjbck
Copy link
Contributor

tjbck commented 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! 🙌

@morgendigital
Copy link

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

@tjbck tjbck closed this as completed Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants