Avoid reconstructing psutil.Process repeatedly
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 重构
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- performance
调研方向
Start by locating TrackedRequest and the sampler call sites that create psutil.Process objects, then inspect how web-server forking affects process-level state. Done means reducing repeated Process construction while preserving correct behavior across forked workers; the issue provides no named tests or files.
由索引模型根据 Issue 内容生成。
描述
A psutil.Process object is not that cheap to recreate (compared to other python objects):
In [2]: %timeit psutil.Process()
13.1 µs ± 101 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
We use several of them - a couple of them per TrackedRequest to get current memory usage, and one per sampler call.
We should figure out some way of reducing this, by sharing an instance. A global wouldn't always work since web servers fork.
- 主要语言
- Python
- 星标
- 77
- 派生
- 19
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
scoutapp/scout_apm_python 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 39/100
scoutapp/scout_apm_python#867 ·
-
Python 3.15 crash - KeyError on distribution.metadata Name access可能已有人在做 @quinnmil 今天认领。 未关闭
scoutapp/scout_apm_python#864 · 2 条评论 · 已指派 1 人 ·
-
难度 1/5 1 小时以内 新手友好度 1/100
scoutapp/scout_apm_python#854 ·
-
redis-py 7.4.0 fixes password leak in ConnectionPool repr and exposes OTel classes可能重新可做 关联的 PR 已关闭且未合并。 未关闭botwork
难度 4/5 3-5 天 新手友好度 42/100
scoutapp/scout_apm_python#841 ·
-
Celery 5.6.3 removes deprecated redis get_connection args — verify Scout instrumentation可能重新可做 关联的 PR 已关闭且未合并。 未关闭botwork
难度 4/5 3-5 天 新手友好度 45/100
scoutapp/scout_apm_python#837 ·
查看 scoutapp/scout_apm_python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
btclib-org/btclib-wallet#587 · 1 条评论 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
Judgment-Pack/judgment-pack-spec#275 ·
维护者通常 1 天内回复
-
ai-generated
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
documentation good first issue priority: low size: XS
难度 1/5 1-3 小时 新手友好度 92/100
yeongseon/azure-functions-doctor-python#651 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
Changaco/python-libarchive-c#146 ·