32 Posts
sUrfa
10 years ago
8
Topic

Hi everyone, 

during the last days I've been optimizing the performance of one of my projects.

After getting good results in the client-optimization, I started debugging the server performance.

What I recognized is poor loading times of my seblod search/list page.

Specifics:

Entries per page: 25

Fields per item: 15

Installed field Plugins (mostly seblod standard: 51)

Server-Reponse-time: min. 2 seconds

To analyze the performance, I used the joomla debugger and recognized that the event-dispatcher consumes 80% of the loading time.

Therefore I hacked "libraries\joomla\event\dispatcher.php" to show me the plugin execution times. (I needed to increase the memory limit of php as well)

Result:

Seblod seems to load every available field plugin for every available field for every entry of the list again.(or even more often)

--> 25 * 15 * 51 would sum up to approx. 19.000 plugin executions for one page load... In my special case I even have 54.000 plugin executions for one page load 

I saw that e.g. the field plugin "Upload image" consumes approx. 1.4ms per load. --> 25*15*1.4 = 525 milliseconds only for this field plugin

Now my question is:

Did I configure something wrongly? If not: Is the Seblod team thinking of changing the plugin execution events to improve the performance of lists? The load times definitely have a bad impact on the PageSpeed ranking of Google (which always complains about high server response times for this project)

If you need further information, just let me know. (I have a plain text file containing the log for instance - 15 MB)

Thank you for your support! Best Regards

sUrfa

Get a Book for SEBLOD
10 years ago
1
Level 1

Hi sUrfa,

Joomla plugin process is not an obligation on SEBLOD list.

Please disable plugin process in your seblod list configuration.

Thanks.

32 Posts
sUrfa
10 years ago
0
Level 2

Hi Bes,

first of all thank you for your quick response!

As I am not 100% sure what you mean by "disable plugin process", I checked the list configuration and global configuration and found the option "Prepare Content". I disabled it for my list and additionally in the global seblod configuration.

Unfortunaltely this does not change the number of plugins triggered. The processing time also remains on the same level.

Did you mean something else?

To provide some additional information:

The plugins are triggered on the following events:

Execute Plugin plgCCK_FieldXYZ::oncck_fieldpreparesearch --> only a few

Execute Plugin plgCCK_FieldXYZ::oncck_fieldpreparecontent --> most of the entries --> this would fit to the setting "Prepare Content". Unfortunately disbling it did not help in my case.

Execute Plugin plgCCK_Field_TypoXYZ::oncck_field_typopreparecontent --> only a few

Thank you for your help!

10 years ago
0
Level 1

Hi sUrfa,

Some clarifications...

The "preparecontent" option is to disable Joomla content plugin to be triggered not SEBLOD plugin.

SEBLOD plugins such as field or typo need of course to be processed. All these process are a lot optimized and don't bring issue about the performance.

You need to be care about how you're using each element.

About upload image field, it seems that you let the generation of thumb every time. After development phase you need to change image upload configuration to set "On Upload (Best Performance).

On SEBLOD project we're often between 0,2 - 0,8 secondes about index.php process. Then it depends on elements included in your page, JS, CSS, images and other. We never used any cache system.

Some screenshots about your SEBLOD list are welcome to see details about how you build your view.

Thanks.

32 Posts
sUrfa
10 years ago
2
Level 1

Hi Bes,

thank you for the insights!

About my form:

I use the intro form of my content type to display search results (the search only filters and orders the results).

Seb_one template is used with Mainbody (text and simple select fields) and Sidebody-A (field-x of images, where first image thumb is displayed). (each position contains 10 fields in total, partially with typo-plugins)

Sidebody-A is overriden by a position-override. Reason: If no picture is saved, a default image is displayed. If the entry is "old" an image caption is added below the thumb. The other nine fields on sidebody-a are used to add microdata to my page (as meta-tags).

The image field behind field-x uses "on upload" for thumbnail generation already.

The page does not use caching

Do you need further details? What specifically?

Thank you!

32 Posts
sUrfa
10 years ago
1
Level 2

UPDATE:

To be sure, that my position override does not cause the problem, I removed it for testing purposes. --> Load time still remains on the same level.

10 years ago
0
Level 3

Thanks sUrfa,

"I use the intro form of my content type to display search results (the search only filters and orders the results)."

We need to know all fields assigned in your search form and the storage of each one.

Thanks.

32 Posts
sUrfa
10 years ago
1
Level 1

Hi Bes,

I narrowed a part of the issue down to one field.

I store an image gallery for my record with a field-x. Having the field-x in my intro-form causes 500ms-1000ms of the loading time. I only need to get the first image thumb for my search results. Therefore I call $cck->get('images')->value[0]->thumb1; in my position override to get the thumb.

Setup:

Field-X "images":

 * Storage: "Custom", "Article", "images", "alter unchecked"

 * Field: "holiday-image" --> see below

 * Minimum: "5", Maximum: "40"

Upload-Image "holiday-image":

 * Storage: "Standard", "Article", "image"

 * Thumbnail-Creation: "On Upload (Best Performance)"

Is there a better way to get an image-thumb from a field-x into the search-results in regards to performance and setup?

Thank you for your help!

32 Posts
sUrfa
10 years ago
0
Level 2

Hi everyone,

I now implemented a workaround to improve the performance of my list.

Setup:

 * I created a new Text-field "images_plain", which points to the same db-column as the field-x (images) and replaced the field-x in my intro-form

 * Additionally I created a small function, which extracts the first image thumb from the column and display the image afterwards with the position override (as done before)

Result:

 * My page now loads approx 1 second faster and the memory usage dropped by 1mb

I know its not standard, but the workaround helps a lot in regards to performance for me.

If you have a better idea by following seblod standard fields, just let me know.

Thank you!

Get a Book for SEBLOD