Skip to content

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

Description

@Yziyan

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

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

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

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

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions