sakaiproject/nakamura — pull request #394 by marktriggs (2011-11-10 03:59:35+00:00)
Title: NOJIRA Don't hit the full profile service from the ProfileNodeSearchResultProcessor

NOJIRA Don't hit the full profile service from the ProfileNodeSearchResultProcessor. Use the BasicUserInfoService instead.

NYU has been seeing some performance issues in production when loading the participants widget for groups with more than 25 members. To render a page of participants, the UI hits a URL like:

/var/search/groupmembers-all.json?group=humans&items=25&page=0&sortOn=firstName&sortOrder=asc&_charset_=utf-8

Each of the 25 authorizables returned is run through the ProfileNodeSearchResultProcessor, which would previously query the profile service for each hit. For a page of 25 hits, this would yield somewhere around 1,200 SQL SELECT statements. Some additional analysis of the issue here:

https://github.com/ieb/sparsemapcontent/issues/119

This commit changes the ProfileNodeSearchResultProfiler to use the BasicUserInfoService instead of the ProfileService. This will change the output returned by the following data feeds:

* /var/search/groupmembers-all.json
* /var/search/groupmembers.json
* /var/search/groups-all.json
* /var/search/groups.json
* /var/search/usersgroups-all.json
* /var/search/usersgroups.json
* /var/search/users-all.json
* /var/search/users.json

I've walked through the various places in 3akai-ux that consume these data feeds and it appears that all of them are satisfied by the subset of information provided by the BasicUserInfoService.