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

优化获取widget的关联信息,修改为批量从数据获取到关联信息 #2040

Merged

Conversation

KANLON
Copy link
Contributor

@KANLON KANLON commented Oct 2, 2022

优化代码,优化获取widget的关联信息,修改为批量从数据获取到关联信息

看原代码获取到widget的关联信息是通过遍历widget,然后每次循环到数据库中获取的关联信息的,这样当要遍历的widget比较多的时候,可能会比较慢

我优化了这部分代码,先在遍历widget信息之前先批量获取从数据库获取到widget的关联信息,然后再在循环中赋值,这样就不用查询多次数据库,提高处理速度

@scottsut scottsut requested a review from tianlu-root March 30, 2023 10:08
@tianlu-root tianlu-root merged commit 71708f5 into running-elephant:dev Mar 31, 2023
@scottsut
Copy link
Contributor

感谢参与贡献!

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

Successfully merging this pull request may close these issues.

3 participants