Skip to content

消耗太多内存 #74

Open
Open
@Xyc2016

Description

@Xyc2016
import os


def print_memory():
    print(process_memory())


def process_memory():
    process = psutil.Process(os.getpid())
    mem_info = process.memory_info()
    return mem_info.rss // (1024 * 1024)


def main():
    print_memory()  # prints 17
    import lark_oapi

    print_memory()  # prints 116


if __name__ == "__main__":
    main()

测试平台

uname -a                              
Linux <MY_MACHINE_NAME> 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May  7 09:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

lark-oapi版本:1.2.8
导入lark_oapi会占用100M内存,太多了,可以解决一下吗?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions