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
[SOLVED] slow page load with CGUserDirectory
[SOLVED] slow page load with CGUserDirectory
Last edited by stevew on Wed Jul 28, 2010 6:42 am, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: slow page load with CGUserDirectory
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.
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.
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.
Re: slow page load with CGUserDirectory
Thanks, Calguy, that makes sense. I'll see about adding indexes to the FEU tables.
Re: [SOLVED] slow page load with CGUserDirectory
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.
Thanks in advance.