[SOLVED] slow page load with CGUserDirectory

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
stevew
Forum Members
Forum Members
Posts: 74
Joined: Wed May 21, 2008 7:02 am

[SOLVED] slow page load with CGUserDirectory

Post by stevew »

Hi,
Using CGUserDirectory, my page load times are very long. Compared to a time-to-first-byte of up to 1.5 seconds for other pages (it's not a particularly fast website!), on CGUserDirectory pages I get a TTFB of 20 seconds or more. This is measured using www.webpagetest.org.

Can anybody tell me whether this is normal and to be expected given the set-up described below? Is it due to having such a large number of user properties?

Server operating system: Linux 2.6.32.9-grsec On i686
Server software: Apache
Server database: MySQL
PHP version: 5.2.12

CMS-MS 1.8.1
CGUserDirectory 1.2.3
FrontEndUsers 1.10.1
CGExtensions 1.19

FrontEndUsers:
Number of users: 218
Number of groups: 1
Number of properties: 61

The 20+ second TTFB occurs when using a CGUserDirectory summary template that returns all or most of the 218 users; on a page using a summary template which selects a very small subset of users, the TTFB is much shorter (though it can still be 5 seconds or so).

Many thanks for your help,
Steve
Last edited by stevew on Wed Jul 28, 2010 6:42 am, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: slow page load with CGUserDirectory

Post by calguy1000 »

Thanks for a post with enough information for us to be able to do some research on and help you.

The CGUserDirectory module accesses the FrontEndUsers tables directly.

It builds a query that matches the criteria you specify in the {CGUserDirectory} call, then selects matching users... this can be slow depending upon the criteria you select.

Secondly, for each matching user it needs to find the users member groups, and read all of the properties (so that you have the ability to view them in the summary view). 

So for 218 users in one summary view would be 1 (very complex one) + 2 * 218 = 437 queries.

You may be able to improve performance some by adding some indexes to the FrontEndUsers tables.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
stevew
Forum Members
Forum Members
Posts: 74
Joined: Wed May 21, 2008 7:02 am

Re: slow page load with CGUserDirectory

Post by stevew »

Thanks, Calguy, that makes sense. I'll see about adding indexes to the FEU tables.
vfreriks
Forum Members
Forum Members
Posts: 22
Joined: Wed Jul 14, 2010 9:41 am

Re: [SOLVED] slow page load with CGUserDirectory

Post by vfreriks »

Hello, I'm sorry to kick this thread but I'm trying to sort the CGUserDirectory output on a property called 'lastname'. This results in slower page loads. I added an index on the 'title' column of the feu_properties table. Is this correct or should I add it to the 'value' column?
Thanks in advance.
Post Reply

Return to “Modules/Add-Ons”