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

📈 可优化成批量注入用户信息 #18

Open
Yziyan opened this issue Feb 14, 2023 · 0 comments
Open

📈 可优化成批量注入用户信息 #18

Yziyan opened this issue Feb 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Yziyan
Copy link
Member

Yziyan commented Feb 14, 2023

从数据库中查出视频列表后,需要为视频注入用户信息。

若是这样循环一条一条注入,此次请求到多少视频,就会产生几次GRPC调用,就会访问几次数据库。(如下图所示)

虽然一次性最多返回30条,但也可以想办法优化成:一次GRPC调用、查询一次用户表。

也就是想办法进行批量查询。

image

@Yziyan Yziyan added the enhancement New feature or request label Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant