Search
Other Sourcerer questions
Forum

table generated in an article very slow in joomla 5

NICOLAS BURNOUF's Avatar NICOLAS BURNOUF
Since i've rebuilt my website with joomla 5, i've difficulties with sourcerer. i generate a table with div (with id and JS function when click) inside an article with sourcerer. This table is generated without problem in joomla 3.It's very fast. In joomla 5 , the same code generate the table in about 11/12 seconds. After sql joomla requests (it works without problem), div are generated with two "for" depending of array values. And it's these two loops "for" that cause the slowness. It's very long. I have the pro sourcerer since a long time. I've no issue until now. Can you help me ? Sorry for my english, i'm french. Nicolas
Peter van Westen's Avatar Peter van Westen ADMIN
Sourcerer just enables you to execute code. It doesn't control how effeciant or fast your custom phpband html code is. That is down to your code.
Please post a rating at the Joomla! Extensions Directory
NICOLAS BURNOUF's Avatar NICOLAS BURNOUF
The same code in joomla 3 with sourcerer cause no problem, table is generated in one second. Now it's 11/12 sec.
Peter van Westen's Avatar Peter van Westen ADMIN
Is this pure html? Or are you rendering this through php?
Please post a rating at the Joomla! Extensions Directory
NICOLAS BURNOUF's Avatar NICOLAS BURNOUF
There is 3 files , a css file, a js file (for function when click on div) and a combined php html file. the problem is in the two cascaded loops with "for" (inside loops are line like <?php echo '<div class="divTableCell" id="'.$iddiv.'" onClick="liencours(id)" onmouseover="myFunction(id)";>'?> <?php echo $This_Cours_Titre[$nbraw][$i][1]; ?> </div>

with Joomla 3 and sourcerer, it's very fast. Now it's very very long
Peter van Westen's Avatar Peter van Westen ADMIN
This is something you will need to debug yourself.
Check where the bottleneck is in the php. See what happens if you don't output the javascript and css.
Switch on debugging. Etc.

Again, Sourcerer doesn't control how your code functions.
Please post a rating at the Joomla! Extensions Directory
NICOLAS BURNOUF's Avatar NICOLAS BURNOUF
I write the same table with JS and ajax and the speed is normal.
Peter van Westen's Avatar Peter van Westen ADMIN
Ok.
Please post a rating at the Joomla! Extensions Directory
NICOLAS BURNOUF's Avatar NICOLAS BURNOUF
All is ok. It was just Xdebug extension on php 8.1 which create very long requests. After disable xdebug, speed requests is normal.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription