How to reduce FC Universal Module Duplicate Database Queries?

More
5 years 2 months ago #75683 by iamrobert
Sorry for misunderastandig.

No - its only appearing once as I have loaded it here with backtrace:

www.taichungdesigner.com/can2/about/

www.taichungdesigner.com/can2/content-page/102-about/776-about

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #75684 by ggppdk
Hello

ok i see that the module is created 3 times
but even in this case the module is optimized and very fast
in fact module is designed so that you can have dozens of universal content modules in the same page ...

huge gallery creation is 3 seconds it account for 95% of page creation
3.040s shugegallery


probably it has no thumbnail caching or it has some slow useless chmod executing on a long list of files


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #75686 by iamrobert
Thanks - its not this page that I am worried about but another site that's more complex, and I have replaced huge gallery in later builds with image field. The problem seems consistent in the sites I have built, but I have only just become aware of it.

I believe the reason its loading 2x is because of modules anywhere as if we set it up:



It triggers the module to load 2x:



and results in many duplicate items:



Page is here: www.taichungdesigner.com/can2/about

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago - 5 years 2 months ago #75687 by iamrobert
Whereas if I change the code to default Joomla load module:




It loads once:



and the duplicates reduce:



Page is here:
www.taichungdesigner.com/can2/content-page/item/777-about_777

So - do you know why this is?

At the moment, perhaps I should just use loadmodule from now on.
Last edit: 5 years 2 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago - 5 years 2 months ago #75694 by ggppdk
Hello

this behavior should be same for all kind of modules, right ?
so maybe this is a question is not appropriate to be addressed to the author of modules anywhere ?


but you can do the following to see

edit
/modules/mod_flexicontent/mod_flexicontent.php

Find
Code:
if ( !$show_mod ) return;


and after the above add
Code:
static $call_count = 0; $call_count++; ob_start(); debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); $trace = ob_get_clean(); JFactory::getApplication()->enqueueMessage( '<code>' . $call_count . ' : MODULE TITLE: ' . $module->title . '</code><br>' . '<pre>' . $trace . '</pre>' , 'notice');


You should see the 2 places that the module is created


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 5 years 2 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #75696 by iamrobert
Thanks for helping me with this ggppdk:

I have updated the code:

Modules Anywhere
www.taichungdesigner.com/can2/about

vs

Joomla Default Load:
www.taichungdesigner.com/can2/content-page/item/777-about_777

However - I don't fully understand why it fires 2x.

Regular Labs believes its this issue:


www.regularlabs.com/forum/modulesanywher...h-flexicontent#84979


So - I think I will revert to {loadmodule} - but have to check/test if I can use Chinese in module titles.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.598 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline