消耗太多内存
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by running the provided psutil reproduction on Linux with lark-oapi 1.2.8, comparing memory before and after importing lark_oapi. Trace which part of the import accounts for the increase; done means identifying and reducing the excessive import-time memory use without breaking the SDK.
Written by the indexing model from the issue text.
Description
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内存,太多了,可以解决一下吗?
- Dominant language
- Python
- Stars
- 559
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from larksuite/oapi-sdk-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
larksuite/oapi-sdk-python#163 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
larksuite/oapi-sdk-python#162 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
larksuite/oapi-sdk-python#161 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
larksuite/oapi-sdk-python#160 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
larksuite/oapi-sdk-python#159 ·
All issues in larksuite/oapi-sdk-python
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100