Advertisement:

Author Topic: [solved] Bender Theme really slow  (Read 4153 times)

rethus

  • Newbie
  • *
  • Posts: 14
[solved] Bender Theme really slow
« on: February 22, 2015, 09:47:18 pm »
If I rename footer.php in the theme-folder, the page got fast again (loadtime: 1.59 sec.)
If I leave footer.php in theme-folder, the Pageload took 6.69 sec.

Maybe there is a bottleneck there. osclass is not nice to use with the actual duration of nearly 7 seconds to load for each page (and at the moment there is no traffic at all on my osclass but myself... what will happen, if the page go live?!)
« Last Edit: February 25, 2015, 12:41:01 pm by rethus »

rethus

  • Newbie
  • *
  • Posts: 14
Re: Bender Theme really slow
« Reply #1 on: February 24, 2015, 11:33:58 pm »
I have made a xdebug cachegrind of the slow osclass-application on my server.
Maybe this helps to analyse parts of sourcecode to optimize for better performance.

http://wikisend.com/download/635900/cachegrind.out._var_www_clients_client1_web129_classifieds_index_php

rethus

  • Newbie
  • *
  • Posts: 14
Re: Bender Theme really slow
« Reply #2 on: February 25, 2015, 11:42:52 am »
Here a part of the cachegrind i fugured out.
Most of the Time (5 seconds from 5,6 seconds) waiste in fsockopen() function in utils.php (see image):


rethus

  • Newbie
  • *
  • Posts: 14
Re: Bender Theme really slow
« Reply #3 on: February 25, 2015, 12:40:47 pm »
I've played arround a bit with utils.php.

If you change
Code: [Select]
$fp = @fsockopen($host, 80);
with
Code: [Select]
$fp = @fsockopen("127.0.0.1", 80);
... I got down from 6,51 to 1,74 seconds time to load.

So why using here a domainname, which need to do a DNS-Lookup, if you can enhance the speed up to 375% ?
Please change this in the Core for future-releases.

lucas88

  • Newbie
  • *
  • Posts: 18
Re: [solved] Bender Theme really slow
« Reply #4 on: March 01, 2015, 05:51:15 pm »
Rethus you are absolutely right! page became superfast after changin this in utils.php ... but error on the top of the page appears :( so i had to restore old utils.php :( any help please?

This is the error:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/username/public_html/oc-includes/osclass/utils.php:1) in /home/username/public_html/oc-includes/osclass/core/Session.php on line 47

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [solved] Bender Theme really slow
« Reply #5 on: March 01, 2015, 11:24:08 pm »
I have done tests on different servers and there is virtually no difference in page load, results are oscillating and falling well within measurement errors (load time 0,5 sec +/- 0,1 sec).

I have seen your issue at github (but you posted it in Bender repo, however it is not the issue of the theme) and have no idea what is the cause of the delay, you need to test your server environment, something is causing it. $host might not always be at local address.

Regards

lucas88

  • Newbie
  • *
  • Posts: 18
Re: [solved] Bender Theme really slow
« Reply #6 on: March 04, 2015, 04:28:46 pm »
I have done tests on different servers and there is virtually no difference in page load, results are oscillating and falling well within measurement errors (load time 0,5 sec +/- 0,1 sec).

I have seen your issue at github (but you posted it in Bender repo, however it is not the issue of the theme) and have no idea what is the cause of the delay, you need to test your server environment, something is causing it. $host might not always be at local address.

Regards

Would you be so kind and answer my question please?  I have put localhost address 127.0.0.1 instead of $host and got that error... is it possible that I have put bad address there? Should I put there ip address of my page? I really need speed up my page... sometimes it takes 10-15 sec to load... I am running this on arvixe hosting ... I have also disabled osclass cron job and run this via cpannel : wget example.org/index.php?page=cron > /dev/null 2>&1  but it did not help me a lot... any suggestion? 

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [solved] Bender Theme really slow
« Reply #7 on: March 04, 2015, 05:08:44 pm »
lucas88 your issue might not be exactly the same as rethus's one, it may even be caused by a plugin or a theme.

Regarding the original issue, my best guess would be the misconfiguration inside hosts file, so better check it. I have also created an issue about this here: https://github.com/osclass/Osclass/issues/1845

Regards

lucas88

  • Newbie
  • *
  • Posts: 18
Re: [solved] Bender Theme really slow
« Reply #8 on: March 12, 2015, 03:44:23 pm »
please I need urgent help... my page is superslow in these days (load time 30-60 seconds) and slow normally(10-15 seconds)... http://tools.pingdom.com/fpt/#!/dPICSt/http://bazarprezeny.eu/  ... What I have to do to optimalize it? I have contacted already arvixe hosting... they are responding to me that from their end is everything ok and pages load speed is fine... And told me to optimalize site... What should I do? it is impossible to load page 60 seconds... 

rethus

  • Newbie
  • *
  • Posts: 14
Re: [solved] Bender Theme really slow
« Reply #9 on: March 30, 2015, 04:11:28 pm »
$host might not always be at local address.

Why not? It is the Host, where the Applications (and at least this script) runs? And this is (viewed from the Script) allways localhost?!
So no need to fire the DNS-Lookup all the time :o


Quote from: lucas88
Cannot send session cache limiter - headers already sent
You may have an output in your script, like echo... or an errormessage is written to the output. Or missing a closing " or ; ?
If you only change the "$host" to "127.0.0.1" an session-error shouldn't appear!


dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [solved] Bender Theme really slow
« Reply #10 on: March 30, 2015, 04:25:16 pm »
For the most configurations yes it is, but if you look in the comment just above that line, there might be an issue with some NAT configurations. Again, never crossed on those, but when this part was coded by some core devs, there must be a reason why it was set this way. You always have to think about wide compatibility. Also, this is not a theme issue, since it affects any theme you use in frontend.

DM

  • Newbie
  • *
  • Posts: 2
Re: Bender Theme really slow
« Reply #11 on: February 13, 2016, 10:15:00 pm »
I've played arround a bit with utils.php.

If you change
Code: [Select]
$fp = @fsockopen($host, 80);
with
Code: [Select]
$fp = @fsockopen("127.0.0.1", 80);
... I got down from 6,51 to 1,74 seconds time to load.

So why using here a domainname, which need to do a DNS-Lookup, if you can enhance the speed up to 375% ?
Please change this in the Core for future-releases.
Instead on replacing in utils.php, replace it in config.php:

define('WEB_PATH', 'http://127.0.0.1/');

For me it improved the loadtime, so thanks for the solution!

Aficionado

  • Guest
Re: [solved] Bender Theme really slow
« Reply #12 on: February 15, 2016, 01:43:58 pm »
For me changing the host to 127.xxxx didn't changed anything. My page was under 1 sec and remained under 1 sec.

I bet this is (as usual) a hosting / server setup and not an Osclass issue.


osCanyon

  • Hero Member
  • *****
  • Posts: 701
  • osCanyon, the class of Osclass
Re: [solved] Bender Theme really slow
« Reply #13 on: April 29, 2016, 06:13:04 am »
you by chance using IE?
for me site is slow ONLY in IE with latest IE 11 and applied patches\
besides you all hear that MS "may" do away with IE, they have a project called 'spartan' (thinks thats the name)
they say they will either ship booth IE and Spartan for dual embedded browsers, drop IE or rename Spartan to IE 12 lol
IE has ""Always"" been a thorn  ::)

please I need urgent help... my page is superslow in these days (load time 30-60 seconds) and slow normally(10-15 seconds)... http://tools.pingdom.com/fpt/#!/dPICSt/http://bazarprezeny.eu/  ... What I have to do to optimalize it? I have contacted already arvixe hosting... they are responding to me that from their end is everything ok and pages load speed is fine... And told me to optimalize site... What should I do? it is impossible to load page 60 seconds...