plone / plone/plone.app.querystring
RegistryReader has bad performance on sites with a lot of users
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 25
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 2
Description
Collections call view @@qsOptions for the query field options. That view is defined in plone.app.content, but it delegates all work to QuerystringRegistryReader in plone.app.querystring. Registry reader "simply" dumps configuration for all queryable fields and operations (both enabled and disabled), including all distinct values for related vocabularies. For sites with a lot of editors, vocabulary for Creator field may become large (and all values are twice in the resulting JSON, once for all indexes and once for sortable indexes). Yet, if the sites is using LDAP (tested only with LDAPUserFolder), rendering @@qsOptions requires fetching full name for all users, who have created content in the site. With some bad luck with the current LDAPUserFolder caches, this may choke a single instance site for a while.
I don't see any obvious fix for this. Comments and ideas are welcome.
Contributor guide
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.
Research direction
Start at the @@qsOptions view in plone.app.content and follow its delegation to QuerystringRegistryReader in plone.app.querystring. Inspect how Creator and related vocabulary values are collected and serialized, then reproduce the LDAPUserFolder case with a large user set. Done would require an agreed fix and evidence that rendering no longer triggers excessive user lookups.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100