简体   繁体   English

使用Plone 4和pas.plugins.sqlalchemy与许多用户

[英]Using Plone 4 and pas.plugins.sqlalchemy with many users

I've been using pas.plugins.sqlalchemy to provide an RDBMS backend for authentication and memberdata storage, using MySQL. 我一直在使用pas.plugins.sqlalchemy为MySQL提供身份验证和成员数据存储的RDBMS后端。 Authentication works perfectly and member data is correctly stored and retrived on the RDBMS. 身份验证工作完美,成员数据在RDBMS上正确存储和恢复。 The current users are over 20.000 目前的用户超过20.000

However, user enumeration takes ages. 但是,用户枚举需要很长时间。 I have checked the " Many users " in the Plone Control Panel / Users and Groups section but even a simple user search takes a near infinite amount of time. 我已经检查了Plone控制面板/用户和组部分中的“ 许多用户 ”,但即使是简单的用户搜索也需要几乎无限的时间。 By debugging the plugin.py script I noticed that enumerateUsers() is called as many times as the number of users stored; 通过调试plugin.py脚本,我注意到enumerateUsers()被调用的次数与存储的用户数一样多; therefore, an enormous amount of CPU time is needed to complete a simple search request, as the query is matched against each username, one user at a time, one query at a time. 因此,完成简单搜索请求需要大量的CPU时间,因为查询与每个用户名匹配,一次一个用户,一次一个查询

Am I missing something here? 我在这里错过了什么吗? Isn't pas.plugins.sqlalchemy useful especially when you have a very large number users? 是不是pas.plugins.sqlalchemy有用,特别是当你有一个非常大的用户? Currently, I have the sql plugin as top priority in my *acl_users/plugins/User Enumeration* setup. 目前,我在我的* acl_users / plugins / User Enumeration *设置中将sql插件作为最高优先级。 Should I change this? 我应该改变吗?

I've pretty much inherited maintenance pas.plugins.sqlalchemy - but I haven't personally used it for more than a handful of users, yet. 我几乎继承了维护pas.plugins.sqlalchemy - 但我还没有亲自将它用于少数几个用户。 If you file a bug at https://github.com/auspex/pas.plugins.sqlalchemy/issues , I'll see what I can do. 如果你在https://github.com/auspex/pas.plugins.sqlalchemy/issues上提交了一个错误,我会看到我能做些什么。

I don't think it can make much difference what order the enumeration occurs - it still has to enumerate all the users in the SQL db. 我认为它不会对枚举发生的顺序产生太大影响 - 它仍然必须枚举SQL db中的所有用户。 So it either does them before the ones found in the ZODB, or after. 所以它要么在ZODB之前发现,要么在之后发现。 It sounds as if the problem begins with Zope - calling enumerateUsers() once per user seems excessive - but even so, it shouldn't be necessary to make a request to the relational db per enumeration. 听起来好像问题始于Zope - 每个用户调用enumerateUsers()一次似乎过多 - 但即便如此,也不需要对每个枚举的关系数据库发出请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM