[GH-ISSUE #966] Specific iteration optimization #50937

Closed
opened 2026-05-05 11:35:28 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Carlos-err406 on GitHub (Feb 29, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/966

Bug Report

Description

this is not actually a big deal but i was skimming trough the codebase working on another issue and saw an unnecesary double loop first to filter and then to present the <option>s, see image below.

Bug Summary:
this section of the code could be optimized with just a conditional

Steps to Reproduce:
src/lib/components/chat/Settings/Interface.svelte lines 194-198

Expected Behavior:
do just one iteration

Actual Behavior:
does two iterations

Environment

  • Operating System: Windows
  • Browser (if applicable): None

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I have reviewed the troubleshooting.md document.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:
[Include relevant Docker container logs, if applicable]

Screenshots (if applicable):
image

Installation Method

none

Additional Information

none

Originally created by @Carlos-err406 on GitHub (Feb 29, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/966 # Bug Report ## Description this is not actually a big deal but i was skimming trough the codebase working on another issue and saw an unnecesary double loop first to filter and then to present the `<option>`s, see image below. **Bug Summary:** this section of the code could be optimized with just a conditional **Steps to Reproduce:** src/lib/components/chat/Settings/Interface.svelte lines 194-198 **Expected Behavior:** do just one iteration **Actual Behavior:** does two iterations ## Environment - **Operating System:** Windows - **Browser (if applicable):** None ## Reproduction Details **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I have reviewed the troubleshooting.md document. - [ ] I have included the browser console logs. - [ ] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** [Include relevant browser console logs, if applicable] **Docker Container Logs:** [Include relevant Docker container logs, if applicable] **Screenshots (if applicable):** ![image](https://github.com/open-webui/open-webui/assets/81443707/2788974e-ca05-4373-b989-8cec8aec2fda) ## Installation Method none ## Additional Information none
Author
Owner

@Carlos-err406 commented on GitHub (Feb 29, 2024):

i would like to open a PR for this if thats ok, already solved in a fork

<!-- gh-comment-id:1971632499 --> @Carlos-err406 commented on GitHub (Feb 29, 2024): i would like to open a PR for this if thats ok, already solved in a fork
Author
Owner

@Carlos-err406 commented on GitHub (Feb 29, 2024):

i just found another loop like that one

image

<!-- gh-comment-id:1971900475 --> @Carlos-err406 commented on GitHub (Feb 29, 2024): i just found another loop like that one ![image](https://github.com/open-webui/open-webui/assets/81443707/904cc592-5024-49c4-a43b-4d5b4adb5c75)
Author
Owner

@Carlos-err406 commented on GitHub (Mar 1, 2024):

in the end there were several (5 more) all of them addressed on #969 (^^")

<!-- gh-comment-id:1973349360 --> @Carlos-err406 commented on GitHub (Mar 1, 2024): in the end there were several (5 more) all of them addressed on #969 (^^")
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#50937