【发布时间】:2015-06-24 12:32:58
【问题描述】:
我找到the hint about using checkinterval in the Plone documentation(用于性能调优)并尝试安装它;在我的buildout.cfg:
[buildout]
parts +=
checkinterval
[checkinterval]
recipe = zc.recipe.egg
eggs =
jarn.checkinterval
但是,当我在构建后尝试调用bin/checkinterval 时,它失败了:
File ".../eggs/jarn.checkinterval-1.0-py2.7.egg/jarn/checkinterval/checkinterval.py", line 4, in <module>
from test import pystone
ImportError: cannot import name pystone
我查看了jarn.checkinterval 包,既没有发现test 模块也没有任何需求规范。
我尝试将test添加到零件列表中,以及pip install test等;但我发现的test 包不包含字符串pystone。
那么,我在哪里可以找到这个 pystone 实用程序,如何集成它才能找到它?
或者这 checkinterval 的东西是否已经过时了?
【问题讨论】:
-
为了获得更好的性能,我建议您每个实例只使用一个线程,并根据需要创建尽可能多的实例;因为 CPython 的内存管理不是线程安全的,Python performance could be worse when using multithreading,所以你最好把这个任务留给操作系统。
标签: performance python-2.7 plone gil plone-4.x