Ticket #14117 (new Bug)

Opened 23 months ago

Last modified 23 months ago

plone.app.controlpanel

Reported by: hoka Owned by:
Priority: minor Milestone: 4.x
Component: Unknown Version: 4.3
Keywords: Cc:

Description

usergroups.py

method membershipSearch, doSearch

userResults = searchView.merge(chain(*[searchView.searchUsers({field: searchString}) for field in ['name', 'fullname', 'email']]), 'userid') Name is not a property of a user so it should be removed here. It results every time in a 0 result.

The next thing is an this is right more important!

For example you have 10000 users in your plone site, this code ends up in a really time expensive search. There is single search triggered für EVERY property in the loop. Wich will causes 3 iterations over 10000 users! And than the whole stuff is merged.

This should be fixed.

Greetings

hoka

Change History

comment:1 Changed 23 months ago by hoka

Then next thing is that def doSearch is doing it twice with inheritance_enabled_users explicit_users so it will end up in 6 iterations over 10000 users and 2 merges over the found results AND 2 loops over inheritance_enabled_users AND explicit_users.

This method is a time eater in larger plone sites

Note: See TracTickets for help on using tickets.