Slow when showing the large version of an image

hamoid / 2013-01-11 00:47:55   

Why can it happen that the large image (30 Kb) takes 3 or 4 seconds to show up?

Generally the site goes fast. I can go from section to section without delay. But every time I click on an image there seems to be a constant delay of several seconds. I see on Firebug that it's calling ajax.php, which seems to include many other files. Is it that the code is taking a long time to execute? Or something misconfigured on my server? Why is there PHP code running at all to show a larger image? Isn't JavaScript enough?

Thanks!

Site: panosbalomenos.com/i/

Vaska A / 2013-01-11 00:48:52   

Which exhibit in particular are you having this problem with?

hamoid / 2013-01-11 14:23:12   

It happens for all exhibits on V2, but I switched back to V1 because I have to port the old design for the new version.

I can turn on V2 temporarily so you can have a look. When would be a good time for that?

Vaska A / 2013-01-11 20:05:10   

That makes it kind of hard to look at the problem...

hamoid / 2013-01-14 00:01:54   

So it's now online...

Every enlarged photo has a 3 or 4 second delay when loading. But sections load fast.

hamoid / 2013-01-14 00:06:24   

I looked at Firebug, and it's actually ajax.php which takes almost 4 seconds to reply.

The enlarged image starts to arrive in less than 100 ms.

Vaska A / 2013-01-14 00:25:06   

On line 7 of /ndxzsite/plugin/plugin.jxs_grow.php you can take this out - it holds things up for one second:

  1. sleep(1);

I had this in there for local testing purposes. Any other holdup has to do with image caching and the speed of the internet plus the database on your server (beyond our control) - we don't want the image to start displaying before your browser has loaded it or you will get odd behavior.

So, when you say it's arriving to your browser that's true, but the full image is not there yet...

hamoid / 2013-01-14 01:19:30   

Actually, plugin.jxs_grow.php includes sleep(1) before the query and sleep(2) after the query. That adds a 3 second delay, which matches closely what I noticed.

I also see sleep(1) calls at plugin.jxs_box.php and plugin.jxs_ndxzbox.php.

Shouldn't all those sleep() calls be removed for all users?

Cheers

Vaska A / 2013-01-14 02:48:32   

Sleep2 is commented out...not being used...

Yes, in the next update they will be removed.

hamoid / 2013-01-14 11:40:12   

Ok, thanks :)

ps. for reference, in my copy sleep(2) is not commented out (downloaded on 10.01.2012 at 8:38pm CET right after purchase).

Vaska A / 2013-01-14 11:57:11   

Ah, it was on mine but I must have done that after the last release. It is in the next release.

Thanks for pointing these out.

This thread has been closed, thank you.