jDiction Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

jDiction 2.2.0 released. http://jdiction.org/downloads

Author Topic: Performance  (Read 14967 times)

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Performance
« on: June 28, 2013, 02:38:58 pm »

With the debug activated, what times are you getting? I´m having performance problems, but Im not sure if is cause the custom changes I have made myself.
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Performance
« Reply #1 on: June 28, 2013, 02:55:50 pm »

jdiction.org Startpage:

Application 0.000 seconds (+0.000); 0.71 MB (+0.709) - afterLoad
Application 0.088 seconds (+0.088); 4.54 MB (+3.831) - afterInitialise
Application 0.093 seconds (+0.004); 4.72 MB (+0.183) - afterRoute
Application 0.157 seconds (+0.064); 7.12 MB (+2.400) - afterDispatch
Application 0.162 seconds (+0.005); 7.29 MB (+0.165) - beforeRenderModule mod_jdlanguage (jdlanguage)
Application 0.177 seconds (+0.015); 7.42 MB (+0.129) - afterRenderModule mod_jdlanguage (jdlanguage)
Application 0.178 seconds (+0.000); 7.42 MB (-0.001) - beforeRenderModule mod_menu (Footer)
Application 0.181 seconds (+0.003); 7.46 MB (+0.044) - afterRenderModule mod_menu (Footer)
Application 0.181 seconds (+0.000); 7.46 MB (-0.003) - beforeRenderModule mod_menu (Sub Second Menu)
Application 0.182 seconds (+0.001); 7.46 MB (+0.004) - afterRenderModule mod_menu (Sub Second Menu)
Application 0.182 seconds (+0.000); 7.46 MB (-0.003) - beforeRenderModule mod_menu (Sub Main Menu)
Application 0.182 seconds (+0.001); 7.46 MB (+0.004) - afterRenderModule mod_menu (Sub Main Menu)
Application 0.182 seconds (+0.000); 7.46 MB (-0.003) - beforeRenderModule mod_menu (Second Menu)
Application 0.185 seconds (+0.003); 7.47 MB (+0.012) - afterRenderModule mod_menu (Second Menu)
Application 0.186 seconds (+0.000); 7.47 MB (-0.003) - beforeRenderModule mod_menu (Main Menu)
Application 0.188 seconds (+0.002); 7.48 MB (+0.009) - afterRenderModule mod_menu (Main Menu)
Application 0.188 seconds (+0.000); 7.47 MB (-0.004) - beforeRenderModule mod_itrfile (Background Image)
Application 0.210 seconds (+0.022); 8.17 MB (+0.693) - afterRenderModule mod_itrfile (Background Image)
Application 0.212 seconds (+0.002); 8.19 MB (+0.026) - afterRender

For native Language with 2 selects on #__jd_store (menu in 2 languages)

Translated:

Application 0.000 seconds (+0.000); 0.71 MB (+0.709) - afterLoad
Application 0.082 seconds (+0.081); 4.71 MB (+4.000) - afterInitialise
Application 0.100 seconds (+0.018); 5.04 MB (+0.336) - afterRoute
Application 0.197 seconds (+0.097); 7.51 MB (+2.466) - afterDispatch
Application 0.211 seconds (+0.014); 7.68 MB (+0.168) - beforeRenderModule mod_jdlanguage (jdlanguage)
Application 0.219 seconds (+0.008); 7.74 MB (+0.064) - afterRenderModule mod_jdlanguage (jdlanguage)
Application 0.220 seconds (+0.000); 7.74 MB (-0.001) - beforeRenderModule mod_menu (Footer)
Application 0.223 seconds (+0.004); 7.79 MB (+0.044) - afterRenderModule mod_menu (Footer)
Application 0.223 seconds (+0.000); 7.78 MB (-0.003) - beforeRenderModule mod_menu (Sub Second Menu)
Application 0.224 seconds (+0.001); 7.79 MB (+0.004) - afterRenderModule mod_menu (Sub Second Menu)
Application 0.224 seconds (+0.000); 7.78 MB (-0.003) - beforeRenderModule mod_menu (Sub Main Menu)
Application 0.225 seconds (+0.001); 7.79 MB (+0.004) - afterRenderModule mod_menu (Sub Main Menu)
Application 0.225 seconds (+0.000); 7.78 MB (-0.003) - beforeRenderModule mod_menu (Second Menu)
Application 0.228 seconds (+0.003); 7.80 MB (+0.012) - afterRenderModule mod_menu (Second Menu)
Application 0.228 seconds (+0.000); 7.79 MB (-0.003) - beforeRenderModule mod_menu (Main Menu)
Application 0.230 seconds (+0.002); 7.80 MB (+0.009) - afterRenderModule mod_menu (Main Menu)
Application 0.230 seconds (+0.000); 7.80 MB (-0.004) - beforeRenderModule mod_itrfile (Background Image)
Application 0.257 seconds (+0.026); 8.53 MB (+0.732) - afterRenderModule mod_itrfile (Background Image)
Application 0.259 seconds (+0.002); 8.56 MB (+0.026) - afterRender

With 7 #__jd_store queries


In the end: 0.259 to 0.212... translation is 0,047 seconds slower.
Logged
Joomla! 5.0 Release Manager
Vote at JED

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: Performance
« Reply #2 on: June 28, 2013, 06:08:46 pm »

yeah, it seems that I borked something :D thanks for your input :D
Logged

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: Performance
« Reply #3 on: June 29, 2013, 08:00:00 pm »

ooook, I think I found something


libraries\jdiction\jdiction.php

line 169

$subdirs2 = JFolder::files(JPATH bla bla

I´m almost sure that the problem is there. I understand that this line search for jdiction.xml files to be able to translate differents components but a full recursive search on the components folder its really perfomarnce intensive. I don´t know how you get so good results :D the solution could be
a) Forbid jdiction.xml outside proper folder
b) Search only one level (details http://docs.joomla.org/API16:JFolder/files)


Let me know ;)
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Performance
« Reply #4 on: July 01, 2013, 02:18:19 pm »

I'm on vacation... the default is not to search recrusive did I changed this?

Logged
Joomla! 5.0 Release Manager
Vote at JED

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: Performance
« Reply #5 on: July 03, 2013, 12:10:53 am »

Just for the record, comment this line on 0.9.9.9 break the code. Probably cause of the merge. Now is something like

$subdirs 1 = bla
//$subdirs 2 = bla

//$subdirs = arraymerge (sb1, sb2)
$subdirs = $subdirs1
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Performance
« Reply #6 on: July 03, 2013, 09:34:08 pm »

you are right, replace

Code: [Select]
$subdirs2 = JFolder::files(JPATH_ADMINISTRATOR.'/components','jdiction.xml', true, true);
with

Code: [Select]
$subdirs2 = JFolder::files(JPATH_ADMINISTRATOR.'/components','jdiction.xml', 1, true);
or

Code: [Select]
$subdirs2 = JFolder::files(JPATH_ADMINISTRATOR.'/components','jdiction.xml', 2, true);
I'm not sure if we need one or two levels.
Logged
Joomla! 5.0 Release Manager
Vote at JED

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: Performance
« Reply #7 on: July 04, 2013, 01:15:59 pm »

well, you are the designer, you´ll have to say where the others need to put the file to you to find it :D but it would be more efficient at level 1 of course
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Performance
« Reply #8 on: July 04, 2013, 05:42:48 pm »

I know that it should be in the first level of the component.
BUt i'm not sure how the function is working. If 1 level is like false or i#it is one level deep.
Logged
Joomla! 5.0 Release Manager
Vote at JED

Thomas Chan

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Performance
« Reply #9 on: February 28, 2014, 04:27:56 am »

This change brought my load time from 10s to 1.5s!
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: Performance
« Reply #10 on: February 28, 2014, 11:55:43 am »

Thanks for remembering me, I add changed it for the next release including cache support.
Logged
Joomla! 5.0 Release Manager
Vote at JED