plone / plone/plone.app.querystring

RegistryReader has bad performance on sites with a lot of users

Open
#66 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

01 type: bug 31 needs: help 43 lvl: complex 99 tag: Plone 5.x
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.