Skip to content

rpc client 性能优化 #9

@leongle

Description

@leongle

https://github.com/smallnest/rpcx-rs/blob/master/rpcx_client/src/client.rs

    pub fn call<T>(
        &mut self,
        service_path: &str,
        service_method: &str,
        is_oneway: bool,
        metadata: &Metadata,
        args: &dyn RpcxParam,
    ) -> Option<Result<T>>
    where
        T: RpcxParam + Default,
    {
        let rt = Runtime::new().unwrap();
        ...

每次 call 创建和销毁运行时,性能上不去,考虑在 client 创建的时候初始化,然后通过 mpc 通讯。或者其它更高效的方式。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions