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

消耗太多内存 #74

Open
Xyc2016 opened this issue Jul 9, 2024 · 0 comments
Open

消耗太多内存 #74

Xyc2016 opened this issue Jul 9, 2024 · 0 comments

Comments

@Xyc2016
Copy link

Xyc2016 commented Jul 9, 2024

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内存,太多了,可以解决一下吗?

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

No branches or pull requests

1 participant