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

Refactor: Improve the performance of refreshModelProviderList. #6672

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Last-Order
Copy link

@Last-Order Last-Order commented Mar 3, 2025

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

When setting model availability on the LLM settings page, getEnableModelsById is called thousands of times, causing a performance issue. This PR partially addresses the problem, but further work is needed to fully resolve it.

📝 补充信息 | Additional Information

On my device, the average time for this operation decreased from ~1000ms to ~200ms.

image

Copy link

vercel bot commented Mar 3, 2025

@Last-Order is attempting to deploy a commit to the LobeChat Desktop Team on Vercel.

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

👍 @Last-Order

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. ⚡️ Performance Performance issue | 性能问题 labels Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡️ Performance Performance issue | 性能问题 size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants