slow picture loading

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

slow picture loading

Tudor Girba-2
Hi,

I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.

It is true that the images are slightly large (~230K), but still I think they appear too slow.

The example is here:
http://www.humane-assessment.com/

Anyone has any idea of why this would happen?

Cheers,
Doru


--
www.tudorgirba.com

"Live like you mean it."

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Johan Brichau-2
Hi Doru,

Use Chrome and open the developer tools before loading the page.
There is a timeline view which tells you exactly what the browser is doing.
That should enable you to find out why it's slow.

I tried it on your website and I got a javascript error while trying to inspect the loading of the page: a reference to undefined because jQuery is not included.
This might have something to do with it.

Johan

On 24 Nov 2012, at 08:29, Tudor Girba wrote:

> Hi,
>
> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>
> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>
> The example is here:
> http://www.humane-assessment.com/
>
> Anyone has any idea of why this would happen?
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
>
> "Live like you mean it."
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Gerhard Obermann
In reply to this post by Tudor Girba-2
Hi Doru,

I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
I tried it with home-icons-400-200-37.png.
Before: 31.092 Bytes
After: 7.678 Bytes

Cheers
Gerhard


On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
Hi,

I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.

It is true that the images are slightly large (~230K), but still I think they appear too slow.

The example is here:
http://www.humane-assessment.com/

Anyone has any idea of why this would happen?

Cheers,
Doru


--
www.tudorgirba.com

"Live like you mean it."

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Gerhard Obermann
In reply to this post by Tudor Girba-2
Hi,
Try also http://tinypng.org/ or similar

Cheers
Gerhard


On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
Hi,

I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.

It is true that the images are slightly large (~230K), but still I think they appear too slow.

The example is here:
http://www.humane-assessment.com/

Anyone has any idea of why this would happen?

Cheers,
Doru


--
www.tudorgirba.com

"Live like you mean it."

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Tudor Girba-2
In reply to this post by Gerhard Obermann
Thanks. But, somehow, I think size is not really the issue.

Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.

And yes, I am using the timeline debugging functionality from the browser.

It's strange.

Doru

On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:

> Hi Doru,
>
> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
> I tried it with home-icons-400-200-37.png.
> Before: 31.092 Bytes
> After: 7.678 Bytes
>
> Cheers
> Gerhard
>
>
> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
> Hi,
>
> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>
> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>
> The example is here:
> http://www.humane-assessment.com/
>
> Anyone has any idea of why this would happen?
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
>
> "Live like you mean it."
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

--
www.tudorgirba.com

"We can create beautiful models in a vacuum.
But, to get them effective we have to deal with the inconvenience of reality."

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Bob Arning-2
I took a look at your site and it reminded me of a problem I had once - not really the same symptoms, but there may be some commonality as to cause. What I was seeing in my app was that occasionally one or two images might not load in the browser. No real pattern as to which images, but it did seem to happen more when the browser sent multiple requests to the server in a very short period of time. What I did was insert a delay in responding to a file request if it was too soon after the previous request. I'm wondering if something similar is happening to you, only that the long file times correspond to a response that did not get sent/received initially, but did after a timeout/retry. What you might do is try to capture in the server when you receive requests and when you think you are sending the response. Maybe the long file times will show a second request or somesuch.  I've attached the code I modified below to aid in experimentation.

Cheers,
Bob

documentForFile: arg

    | wait result waitList myFirstTime |

    self prepare.

    myFirstTime _ Time millisecondClockValue.
    lastRequestTime ifNil: [lastRequestTime _ 0].
    lastRequestTime _ lastRequestTime min: myFirstTime.
    waitList _ #().
    [
        wait _ 20 - (Time millisecondClockValue - lastRequestTime) min: 20.
        wait > 0
    ] whileTrue: [
        waitList _ waitList,{wait}.
        wait asString,' wait for ',arg asString,'      ' displayAt: 0@20.
        (Delay forMilliseconds: wait) wait.
    ].

    lastRequestTime _ Time millisecondClockValue.
    result _ self documentForFileInner: arg.
    TallyingDocumentTimes ifNotNil: [
        TallyingDocumentTimes add: {
            myFirstTime.
            Time millisecondClockValue.
            result size.
            waitList.
            arg.
"thisContext longStack."
        }.
    ].

    ^result


On 11/25/12 6:24 PM, Tudor Girba wrote:
Thanks. But, somehow, I think size is not really the issue.

Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.

And yes, I am using the timeline debugging functionality from the browser.

It's strange.

Doru

On 24 Nov 2012, at 10:26, Gerhard Obermann [hidden email] wrote:

Hi Doru,

I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
I tried it with home-icons-400-200-37.png.
Before: 31.092 Bytes
After: 7.678 Bytes

Cheers
Gerhard


On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba [hidden email] wrote:
Hi,

I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.

It is true that the images are slightly large (~230K), but still I think they appear too slow.

The example is here:
http://www.humane-assessment.com/

Anyone has any idea of why this would happen?

Cheers,
Doru


--
www.tudorgirba.com

"Live like you mean it."

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
--
www.tudorgirba.com

"We can create beautiful models in a vacuum.
But, to get them effective we have to deal with the inconvenience of reality."

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

jgfoster
In reply to this post by Tudor Girba-2
Hi Doru,

How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.

James

On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:

> Thanks. But, somehow, I think size is not really the issue.
>
> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>
> And yes, I am using the timeline debugging functionality from the browser.
>
> It's strange.
>
> Doru
>
> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
>
>> Hi Doru,
>>
>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>> I tried it with home-icons-400-200-37.png.
>> Before: 31.092 Bytes
>> After: 7.678 Bytes
>>
>> Cheers
>> Gerhard
>>
>>
>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
>> Hi,
>>
>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>>
>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>>
>> The example is here:
>> http://www.humane-assessment.com/
>>
>> Anyone has any idea of why this would happen?
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Live like you mean it."
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> --
> www.tudorgirba.com
>
> "We can create beautiful models in a vacuum.
> But, to get them effective we have to deal with the inconvenience of reality."
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Paul DeBruicker
I suspect James has the answer but you might also consider doing the
following:

-Add expires headers for the images in Apache and people will only have
to download them once.

-Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
upgrading to the latest stable version just to get the security
vulnerability fixes.



On 11/25/2012 08:11 PM, James Foster wrote:

> Hi Doru,
>
> How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
>
> James
>
> On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
>
>> Thanks. But, somehow, I think size is not really the issue.
>>
>> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>>
>> And yes, I am using the timeline debugging functionality from the browser.
>>
>> It's strange.
>>
>> Doru
>>
>> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
>>
>>> Hi Doru,
>>>
>>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>>> I tried it with home-icons-400-200-37.png.
>>> Before: 31.092 Bytes
>>> After: 7.678 Bytes
>>>
>>> Cheers
>>> Gerhard
>>>
>>>
>>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
>>> Hi,
>>>
>>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>>>
>>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>>>
>>> The example is here:
>>> http://www.humane-assessment.com/
>>>
>>> Anyone has any idea of why this would happen?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Live like you mean it."
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> --
>> www.tudorgirba.com
>>
>> "We can create beautiful models in a vacuum.
>> But, to get them effective we have to deal with the inconvenience of reality."
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Tudor Girba-2
Hi Paul, hi James,

Thanks for the answers.

I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for how to:
- increase the resources count
- add expire headers for the images

?

Cheers,
Doru


On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker <[hidden email]> wrote:
I suspect James has the answer but you might also consider doing the
following:

-Add expires headers for the images in Apache and people will only have
to download them once.

-Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
upgrading to the latest stable version just to get the security
vulnerability fixes.



On 11/25/2012 08:11 PM, James Foster wrote:
> Hi Doru,
>
> How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
>
> James
>
> On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
>
>> Thanks. But, somehow, I think size is not really the issue.
>>
>> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>>
>> And yes, I am using the timeline debugging functionality from the browser.
>>
>> It's strange.
>>
>> Doru
>>
>> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
>>
>>> Hi Doru,
>>>
>>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>>> I tried it with home-icons-400-200-37.png.
>>> Before: 31.092 Bytes
>>> After: 7.678 Bytes
>>>
>>> Cheers
>>> Gerhard
>>>
>>>
>>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
>>> Hi,
>>>
>>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>>>
>>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>>>
>>> The example is here:
>>> http://www.humane-assessment.com/
>>>
>>> Anyone has any idea of why this would happen?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Live like you mean it."
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> --
>> www.tudorgirba.com
>>
>> "We can create beautiful models in a vacuum.
>> But, to get them effective we have to deal with the inconvenience of reality."
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--

"Every thing has its own flow"


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

jgfoster
Hi Duro,

Before we try to adjust the configurations we should verify that the symptoms fit. When you look at your timeline in the client browser does it appear that there are clumps or groups of things being received? Is there a consistent number of items that come in each group? Is the wait till the next group consistent? Could you post a screen shot of the timeline and confirm that it is representative?

James

On Nov 26, 2012, at 1:27 AM, Tudor Girba wrote:

Hi Paul, hi James,

Thanks for the answers.

I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for how to:
- increase the resources count
- add expire headers for the images

?

Cheers,
Doru


On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker <[hidden email]> wrote:
I suspect James has the answer but you might also consider doing the
following:

-Add expires headers for the images in Apache and people will only have
to download them once.

-Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
upgrading to the latest stable version just to get the security
vulnerability fixes.



On 11/25/2012 08:11 PM, James Foster wrote:
> Hi Doru,
>
> How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
>
> James
>
> On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
>
>> Thanks. But, somehow, I think size is not really the issue.
>>
>> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>>
>> And yes, I am using the timeline debugging functionality from the browser.
>>
>> It's strange.
>>
>> Doru
>>
>> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
>>
>>> Hi Doru,
>>>
>>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>>> I tried it with home-icons-400-200-37.png.
>>> Before: 31.092 Bytes
>>> After: 7.678 Bytes
>>>
>>> Cheers
>>> Gerhard
>>>
>>>
>>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
>>> Hi,
>>>
>>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>>>
>>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>>>
>>> The example is here:
>>> http://www.humane-assessment.com/
>>>
>>> Anyone has any idea of why this would happen?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Live like you mean it."
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> --
>> www.tudorgirba.com
>>
>> "We can create beautiful models in a vacuum.
>> But, to get them effective we have to deal with the inconvenience of reality."
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--

"Every thing has its own flow"

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Bob Arning-2
Also, is the problem sensitive to the number of images loaded on the page? If you simplify the page (one image at a time) does the problem go away at some point?

On 11/26/12 10:28 AM, James Foster wrote:
Hi Duro,

Before we try to adjust the configurations we should verify that the symptoms fit. When you look at your timeline in the client browser does it appear that there are clumps or groups of things being received? Is there a consistent number of items that come in each group? Is the wait till the next group consistent? Could you post a screen shot of the timeline and confirm that it is representative?

James

On Nov 26, 2012, at 1:27 AM, Tudor Girba wrote:

Hi Paul, hi James,

Thanks for the answers.

I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for how to:
- increase the resources count
- add expire headers for the images

?

Cheers,
Doru


On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker <[hidden email]> wrote:
I suspect James has the answer but you might also consider doing the
following:

-Add expires headers for the images in Apache and people will only have
to download them once.

-Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
upgrading to the latest stable version just to get the security
vulnerability fixes.



On 11/25/2012 08:11 PM, James Foster wrote:
> Hi Doru,
>
> How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
>
> James
>
> On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
>
>> Thanks. But, somehow, I think size is not really the issue.
>>
>> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>>
>> And yes, I am using the timeline debugging functionality from the browser.
>>
>> It's strange.
>>
>> Doru
>>
>> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
>>
>>> Hi Doru,
>>>
>>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>>> I tried it with home-icons-400-200-37.png.
>>> Before: 31.092 Bytes
>>> After: 7.678 Bytes
>>>
>>> Cheers
>>> Gerhard
>>>
>>>
>>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
>>> Hi,
>>>
>>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>>>
>>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>>>
>>> The example is here:
>>> http://www.humane-assessment.com/
>>>
>>> Anyone has any idea of why this would happen?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Live like you mean it."
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> --
>> www.tudorgirba.com
>>
>> "We can create beautiful models in a vacuum.
>> But, to get them effective we have to deal with the inconvenience of reality."
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--

"Every thing has its own flow"

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Bob Arning-2
In reply to this post by Tudor Girba-2
I wrote a Squeak simulation of the browser loading 14 of the files on your page. I used a separate process for each httpGet: and typically were complete in under 1.5 seconds. When I hit reload on the browser, there are often 1 or 2 files taking a bit over 15 seconds. Suggests something different about how the browser requests data vs. my simple simulation.

Interesting that the response headers are:

HTTP/1.1 304 Not Modified
Date: Mon, 26 Nov 2012 19:19:23 GMT
Server: Apache/2.2.8 (Ubuntu)
Connection: Keep-Alive
Keep-Alive: timeout=15, max=100
ETag: "392802a-7974-4cf387f145600"

Is it just a coincidence that the keep-alive timeout is 15 seconds and that the slow files take 15.7 seconds? Attached is an HAR file with the browser timing details.

Cheers,
Bob

On 11/26/12 4:27 AM, Tudor Girba wrote:
Hi Paul, hi James,

Thanks for the answers.

I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for how to:
- increase the resources count
- add expire headers for the images

?

Cheers,
Doru


On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker <[hidden email]> wrote:
I suspect James has the answer but you might also consider doing the
following:

-Add expires headers for the images in Apache and people will only have
to download them once.

-Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
upgrading to the latest stable version just to get the security
vulnerability fixes.



On 11/25/2012 08:11 PM, James Foster wrote:
> Hi Doru,
>
> How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
>
> James
>
> On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
>
>> Thanks. But, somehow, I think size is not really the issue.
>>
>> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>>
>> And yes, I am using the timeline debugging functionality from the browser.
>>
>> It's strange.
>>
>> Doru
>>
>> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
>>
>>> Hi Doru,
>>>
>>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>>> I tried it with home-icons-400-200-37.png.
>>> Before: 31.092 Bytes
>>> After: 7.678 Bytes
>>>
>>> Cheers
>>> Gerhard
>>>
>>>
>>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
>>> Hi,
>>>
>>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>>>
>>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>>>
>>> The example is here:
>>> http://www.humane-assessment.com/
>>>
>>> Anyone has any idea of why this would happen?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Live like you mean it."
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> --
>> www.tudorgirba.com
>>
>> "We can create beautiful models in a vacuum.
>> But, to get them effective we have to deal with the inconvenience of reality."
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--

"Every thing has its own flow"



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

www.humane-assessmen (99K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Tudor Girba-2
Hi Bob and James,

Thanks again.

It seems to be that the 15s is too much of a coincidence :).

I put together two experiments that show that the loading problem depends on the amount of images:

- a page with 3 extra images on top of the template. This seems to exhibit the problem for exactly one slow loading image:
http://www.humane-assessment.com/test3ExtraImages

- a page with only 1 extra image on top of the template. This loads fine:
http://www.humane-assessment.com/testOneExtraImage


But, I still do not quite understand where to look next. Any further advice?

Cheers,
Doru


On 26 Nov 2012, at 20:41, Bob Arning <[hidden email]> wrote:

> I wrote a Squeak simulation of the browser loading 14 of the files on your page. I used a separate process for each httpGet: and typically were complete in under 1.5 seconds. When I hit reload on the browser, there are often 1 or 2 files taking a bit over 15 seconds. Suggests something different about how the browser requests data vs. my simple simulation.
>
> Interesting that the response headers are:
>
> HTTP/1.1 304 Not Modified
> Date: Mon, 26 Nov 2012 19:19:23 GMT
> Server: Apache/2.2.8 (Ubuntu)
> Connection: Keep-Alive
> Keep-Alive: timeout=15, max=100
> ETag: "392802a-7974-4cf387f145600"
>
> Is it just a coincidence that the keep-alive timeout is 15 seconds and that the slow files take 15.7 seconds? Attached is an HAR file with the browser timing details.
>
> Cheers,
> Bob
>
> On 11/26/12 4:27 AM, Tudor Girba wrote:
>> Hi Paul, hi James,
>>
>> Thanks for the answers.
>>
>> I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for         how to:
>> - increase the resources count
>> - add expire headers for the images
>>
>> ?
>>
>> Cheers,
>> Doru
>>
>>
>> On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker <[hidden email]> wrote:
>> I suspect James has the answer but you might also consider doing the
>> following:
>>
>> -Add expires headers for the images in Apache and people will only have
>> to download them once.
>>
>> -Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
>> upgrading to the latest stable version just to get the security
>> vulnerability fixes.
>>
>>
>>
>> On 11/25/2012 08:11 PM, James Foster wrote:
>> > Hi Doru,
>> >
>> > How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
>> >
>> > James
>> >
>> > On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
>> >
>> >> Thanks. But, somehow, I think size is not really the issue.
>> >>
>> >> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>> >>
>> >> And yes, I am using the timeline debugging functionality from the browser.
>> >>
>> >> It's strange.
>> >>
>> >> Doru
>> >>
>> >> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
>> >>
>> >>> Hi Doru,
>> >>>
>> >>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>> >>> I tried it with home-icons-400-200-37.png.
>> >>> Before: 31.092 Bytes
>> >>> After: 7.678 Bytes
>> >>>
>> >>> Cheers
>> >>> Gerhard
>> >>>
>> >>>
>> >>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
>> >>> Hi,
>> >>>
>> >>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>> >>>
>> >>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>> >>>
>> >>> The example is here:
>> >>> http://www.humane-assessment.com/
>> >>>
>> >>> Anyone has any idea of why this would happen?
>> >>>
>> >>> Cheers,
>> >>> Doru
>> >>>
>> >>>
>> >>> --
>> >>> www.tudorgirba.com
>> >>>
>> >>> "Live like you mean it."
>> >>>
>> >>> _______________________________________________
>> >>> seaside mailing list
>> >>> [hidden email]
>> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >>>
>> >>> _______________________________________________
>> >>> seaside mailing list
>> >>> [hidden email]
>> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >>
>> >> --
>> >> www.tudorgirba.com
>> >>
>> >> "We can create beautiful models in a vacuum.
>> >> But, to get them effective we have to deal with the inconvenience of reality."
>> >>
>> >> _______________________________________________
>> >> seaside mailing list
>> >> [hidden email]
>> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >>
>> >
>> > _______________________________________________
>> > seaside mailing list
>> > [hidden email]
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing has its own flow"
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>>
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> <www.humane-assessmen>_______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

--
www.tudorgirba.com

"Problem solving should be focused on describing
the problem in a way that makes the solution obvious."




_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Paul DeBruicker
It looks like the images aren't loaded until after the Javascript is
loaded and compilied.  Can you move the javascript to the end of the
document rather than having it in the HEAD?  I don't use pier so don't
know if that's easy or not.  Also the bootstrap JS relies upon jQuery so
you might benefit from having jQuery load first.  Not sure about the
pier.js stuff.



I just use a component at the end of the page with a render method like

addJsToPage:html
        html script resourceUrl:'js/JQuery.minjs'.
        html script resourceUrl: 'js/site.js'

at the base of my main component to load JS at the end.


also there is a 'yslow' addon for firefox/chrome that may help trouble
shoot why the page is slow.  Its from Yahoo here:

http://yslow.org/





On 11/27/2012 11:34 AM, Tudor Girba wrote:

> Hi Bob and James,
>
> Thanks again.
>
> It seems to be that the 15s is too much of a coincidence :).
>
> I put together two experiments that show that the loading problem depends on the amount of images:
>
> - a page with 3 extra images on top of the template. This seems to exhibit the problem for exactly one slow loading image:
> http://www.humane-assessment.com/test3ExtraImages
>
> - a page with only 1 extra image on top of the template. This loads fine:
> http://www.humane-assessment.com/testOneExtraImage
>
>
> But, I still do not quite understand where to look next. Any further advice?
>
> Cheers,
> Doru
>
>
> On 26 Nov 2012, at 20:41, Bob Arning <[hidden email]> wrote:
>
>> I wrote a Squeak simulation of the browser loading 14 of the files on your page. I used a separate process for each httpGet: and typically were complete in under 1.5 seconds. When I hit reload on the browser, there are often 1 or 2 files taking a bit over 15 seconds. Suggests something different about how the browser requests data vs. my simple simulation.
>>
>> Interesting that the response headers are:
>>
>> HTTP/1.1 304 Not Modified
>> Date: Mon, 26 Nov 2012 19:19:23 GMT
>> Server: Apache/2.2.8 (Ubuntu)
>> Connection: Keep-Alive
>> Keep-Alive: timeout=15, max=100
>> ETag: "392802a-7974-4cf387f145600"
>>
>> Is it just a coincidence that the keep-alive timeout is 15 seconds and that the slow files take 15.7 seconds? Attached is an HAR file with the browser timing details.
>>
>> Cheers,
>> Bob
>>
>> On 11/26/12 4:27 AM, Tudor Girba wrote:
>>> Hi Paul, hi James,
>>>
>>> Thanks for the answers.
>>>
>>> I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for         how to:
>>> - increase the resources count
>>> - add expire headers for the images
>>>
>>> ?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker <[hidden email]> wrote:
>>> I suspect James has the answer but you might also consider doing the
>>> following:
>>>
>>> -Add expires headers for the images in Apache and people will only have
>>> to download them once.
>>>
>>> -Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
>>> upgrading to the latest stable version just to get the security
>>> vulnerability fixes.
>>>
>>>
>>>
>>> On 11/25/2012 08:11 PM, James Foster wrote:
>>>> Hi Doru,
>>>>
>>>> How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
>>>>
>>>> James
>>>>
>>>> On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
>>>>
>>>>> Thanks. But, somehow, I think size is not really the issue.
>>>>>
>>>>> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>>>>>
>>>>> And yes, I am using the timeline debugging functionality from the browser.
>>>>>
>>>>> It's strange.
>>>>>
>>>>> Doru
>>>>>
>>>>> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
>>>>>
>>>>>> Hi Doru,
>>>>>>
>>>>>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>>>>>> I tried it with home-icons-400-200-37.png.
>>>>>> Before: 31.092 Bytes
>>>>>> After: 7.678 Bytes
>>>>>>
>>>>>> Cheers
>>>>>> Gerhard
>>>>>>
>>>>>>
>>>>>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>>>>>>
>>>>>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>>>>>>
>>>>>> The example is here:
>>>>>> http://www.humane-assessment.com/
>>>>>>
>>>>>> Anyone has any idea of why this would happen?
>>>>>>
>>>>>> Cheers,
>>>>>> Doru
>>>>>>
>>>>>>
>>>>>> --
>>>>>> www.tudorgirba.com
>>>>>>
>>>>>> "Live like you mean it."
>>>>>>
>>>>>> _______________________________________________
>>>>>> seaside mailing list
>>>>>> [hidden email]
>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>>
>>>>>> _______________________________________________
>>>>>> seaside mailing list
>>>>>> [hidden email]
>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>
>>>>> --
>>>>> www.tudorgirba.com
>>>>>
>>>>> "We can create beautiful models in a vacuum.
>>>>> But, to get them effective we have to deal with the inconvenience of reality."
>>>>>
>>>>> _______________________________________________
>>>>> seaside mailing list
>>>>> [hidden email]
>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>
>>>>
>>>> _______________________________________________
>>>> seaside mailing list
>>>> [hidden email]
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Every thing has its own flow"
>>>
>>>
>>>
>>> _______________________________________________
>>> seaside mailing list
>>>
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> <www.humane-assessmen>_______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> --
> www.tudorgirba.com
>
> "Problem solving should be focused on describing
> the problem in a way that makes the solution obvious."
>
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Gerhard Obermann
In reply to this post by Tudor Girba-2
Hi!

Why are the js files not served through apache.
I have also sometimes long waiting times for the js files only.

BTW we are using Nginx. We moved from apache to lighttp to nginx.
We also compress all js files into one file before serving.

So it seems not be related to the png files only.


Cheers
Gerhard



On Tue, Nov 27, 2012 at 8:34 PM, Tudor Girba <[hidden email]> wrote:
Hi Bob and James,

Thanks again.

It seems to be that the 15s is too much of a coincidence :).

I put together two experiments that show that the loading problem depends on the amount of images:

- a page with 3 extra images on top of the template. This seems to exhibit the problem for exactly one slow loading image:
http://www.humane-assessment.com/test3ExtraImages

- a page with only 1 extra image on top of the template. This loads fine:
http://www.humane-assessment.com/testOneExtraImage


But, I still do not quite understand where to look next. Any further advice?

Cheers,
Doru


On 26 Nov 2012, at 20:41, Bob Arning <[hidden email]> wrote:

> I wrote a Squeak simulation of the browser loading 14 of the files on your page. I used a separate process for each httpGet: and typically were complete in under 1.5 seconds. When I hit reload on the browser, there are often 1 or 2 files taking a bit over 15 seconds. Suggests something different about how the browser requests data vs. my simple simulation.
>
> Interesting that the response headers are:
>
> HTTP/1.1 304 Not Modified
> Date: Mon, 26 Nov 2012 19:19:23 GMT
> Server: Apache/2.2.8 (Ubuntu)
> Connection: Keep-Alive
> Keep-Alive: timeout=15, max=100
> ETag: "392802a-7974-4cf387f145600"
>
> Is it just a coincidence that the keep-alive timeout is 15 seconds and that the slow files take 15.7 seconds? Attached is an HAR file with the browser timing details.
>
> Cheers,
> Bob
>
> On 11/26/12 4:27 AM, Tudor Girba wrote:
>> Hi Paul, hi James,
>>
>> Thanks for the answers.
>>
>> I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for         how to:
>> - increase the resources count
>> - add expire headers for the images
>>
>> ?
>>
>> Cheers,
>> Doru
>>
>>
>> On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker <[hidden email]> wrote:
>> I suspect James has the answer but you might also consider doing the
>> following:
>>
>> -Add expires headers for the images in Apache and people will only have
>> to download them once.
>>
>> -Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
>> upgrading to the latest stable version just to get the security
>> vulnerability fixes.
>>
>>
>>
>> On 11/25/2012 08:11 PM, James Foster wrote:
>> > Hi Doru,
>> >
>> > How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
>> >
>> > James
>> >
>> > On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
>> >
>> >> Thanks. But, somehow, I think size is not really the issue.
>> >>
>> >> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>> >>
>> >> And yes, I am using the timeline debugging functionality from the browser.
>> >>
>> >> It's strange.
>> >>
>> >> Doru
>> >>
>> >> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
>> >>
>> >>> Hi Doru,
>> >>>
>> >>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>> >>> I tried it with home-icons-400-200-37.png.
>> >>> Before: 31.092 Bytes
>> >>> After: 7.678 Bytes
>> >>>
>> >>> Cheers
>> >>> Gerhard
>> >>>
>> >>>
>> >>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
>> >>> Hi,
>> >>>
>> >>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>> >>>
>> >>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>> >>>
>> >>> The example is here:
>> >>> http://www.humane-assessment.com/
>> >>>
>> >>> Anyone has any idea of why this would happen?
>> >>>
>> >>> Cheers,
>> >>> Doru
>> >>>
>> >>>
>> >>> --
>> >>> www.tudorgirba.com
>> >>>
>> >>> "Live like you mean it."
>> >>>
>> >>> _______________________________________________
>> >>> seaside mailing list
>> >>> [hidden email]
>> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >>>
>> >>> _______________________________________________
>> >>> seaside mailing list
>> >>> [hidden email]
>> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >>
>> >> --
>> >> www.tudorgirba.com
>> >>
>> >> "We can create beautiful models in a vacuum.
>> >> But, to get them effective we have to deal with the inconvenience of reality."
>> >>
>> >> _______________________________________________
>> >> seaside mailing list
>> >> [hidden email]
>> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >>
>> >
>> > _______________________________________________
>> > seaside mailing list
>> > [hidden email]
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing has its own flow"
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>>
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> <www.humane-assessmen>_______________________________________________
"Problem solving should be focused on describing
the problem in a way that makes the solution obvious."




_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Bob Arning-2
In reply to this post by Tudor Girba-2
Doru,

Here are some suggestions:

1. Is it a browser issue? I'm seeing it in Chrome - MacOS 10.7.
2. See if tinkering with apache's keep-alive makes a difference. In /etc/apache2/httpd.conf (on a mac, anyway), there is this:

# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

so try a bigger number or turning it off. I think you need to stop & restart apache for this to take effect.

3. How easy is it to take apache out of the loop and serve directly from Seaside?
4. Paul mentions moving some javascript - I looked at the audits tab in the Chrome developer tools and it said this about your page:


Optimize the order of styles and scripts (3)

    The following external CSS files were included after an external JavaScript file in the document head. To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript.
        bootstrap.min.css
        bootstrap-responsive.min.css
        style.css

so maybe moving that kavascript is something to try.

Cheers,
Bob

P.S. I updated my squeak test to reuse sockets and still had no problem, so it looks more and more like something the browser is doing beyond just getting a bunch of files.


On 11/27/12 2:34 PM, Tudor Girba wrote:
Hi Bob and James,

Thanks again.

It seems to be that the 15s is too much of a coincidence :).

I put together two experiments that show that the loading problem depends on the amount of images:

- a page with 3 extra images on top of the template. This seems to exhibit the problem for exactly one slow loading image:
http://www.humane-assessment.com/test3ExtraImages

- a page with only 1 extra image on top of the template. This loads fine:
http://www.humane-assessment.com/testOneExtraImage


But, I still do not quite understand where to look next. Any further advice?

Cheers,
Doru


On 26 Nov 2012, at 20:41, Bob Arning [hidden email] wrote:

I wrote a Squeak simulation of the browser loading 14 of the files on your page. I used a separate process for each httpGet: and typically were complete in under 1.5 seconds. When I hit reload on the browser, there are often 1 or 2 files taking a bit over 15 seconds. Suggests something different about how the browser requests data vs. my simple simulation.

Interesting that the response headers are:

HTTP/1.1 304 Not Modified
Date: Mon, 26 Nov 2012 19:19:23 GMT
Server: Apache/2.2.8 (Ubuntu)
Connection: Keep-Alive
Keep-Alive: timeout=15, max=100
ETag: "392802a-7974-4cf387f145600"

Is it just a coincidence that the keep-alive timeout is 15 seconds and that the slow files take 15.7 seconds? Attached is an HAR file with the browser timing details.

Cheers,
Bob

On 11/26/12 4:27 AM, Tudor Girba wrote:
Hi Paul, hi James,

Thanks for the answers.

I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for         how to:
- increase the resources count
- add expire headers for the images

?

Cheers,
Doru


On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker [hidden email] wrote:
I suspect James has the answer but you might also consider doing the
following:

-Add expires headers for the images in Apache and people will only have
to download them once.

-Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
upgrading to the latest stable version just to get the security
vulnerability fixes.



On 11/25/2012 08:11 PM, James Foster wrote:
Hi Doru,

How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.

James

On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:

Thanks. But, somehow, I think size is not really the issue.

Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.

And yes, I am using the timeline debugging functionality from the browser.

It's strange.

Doru

On 24 Nov 2012, at 10:26, Gerhard Obermann [hidden email] wrote:

Hi Doru,

I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
I tried it with home-icons-400-200-37.png.
Before: 31.092 Bytes
After: 7.678 Bytes

Cheers
Gerhard


On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba [hidden email] wrote:
Hi,

I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.

It is true that the images are slightly large (~230K), but still I think they appear too slow.

The example is here:
http://www.humane-assessment.com/

Anyone has any idea of why this would happen?

Cheers,
Doru


--
www.tudorgirba.com

"Live like you mean it."

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
--
www.tudorgirba.com

"We can create beautiful models in a vacuum.
But, to get them effective we have to deal with the inconvenience of reality."

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



-- 
www.tudorgirba.com

"Every thing has its own flow"



_______________________________________________
seaside mailing list

[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
<www.humane-assessmen>_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
--
www.tudorgirba.com

"Problem solving should be focused on describing
the problem in a way that makes the solution obvious."




_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Tudor Girba-2
In reply to this post by Gerhard Obermann
Hi,

As far as I see, the javascript files are being served directly through apache. Why do you say differently?

Cheers,
Doru


On 27 Nov 2012, at 21:24, Gerhard Obermann <[hidden email]> wrote:

> Hi!
>
> Why are the js files not served through apache.
> I have also sometimes long waiting times for the js files only.
>
> BTW we are using Nginx. We moved from apache to lighttp to nginx.
> We also compress all js files into one file before serving.
>
> So it seems not be related to the png files only.
>
>
> Cheers
> Gerhard
>
>
>
> On Tue, Nov 27, 2012 at 8:34 PM, Tudor Girba <[hidden email]> wrote:
> Hi Bob and James,
>
> Thanks again.
>
> It seems to be that the 15s is too much of a coincidence :).
>
> I put together two experiments that show that the loading problem depends on the amount of images:
>
> - a page with 3 extra images on top of the template. This seems to exhibit the problem for exactly one slow loading image:
> http://www.humane-assessment.com/test3ExtraImages
>
> - a page with only 1 extra image on top of the template. This loads fine:
> http://www.humane-assessment.com/testOneExtraImage
>
>
> But, I still do not quite understand where to look next. Any further advice?
>
> Cheers,
> Doru
>
>
> On 26 Nov 2012, at 20:41, Bob Arning <[hidden email]> wrote:
>
> > I wrote a Squeak simulation of the browser loading 14 of the files on your page. I used a separate process for each httpGet: and typically were complete in under 1.5 seconds. When I hit reload on the browser, there are often 1 or 2 files taking a bit over 15 seconds. Suggests something different about how the browser requests data vs. my simple simulation.
> >
> > Interesting that the response headers are:
> >
> > HTTP/1.1 304 Not Modified
> > Date: Mon, 26 Nov 2012 19:19:23 GMT
> > Server: Apache/2.2.8 (Ubuntu)
> > Connection: Keep-Alive
> > Keep-Alive: timeout=15, max=100
> > ETag: "392802a-7974-4cf387f145600"
> >
> > Is it just a coincidence that the keep-alive timeout is 15 seconds and that the slow files take 15.7 seconds? Attached is an HAR file with the browser timing details.
> >
> > Cheers,
> > Bob
> >
> > On 11/26/12 4:27 AM, Tudor Girba wrote:
> >> Hi Paul, hi James,
> >>
> >> Thanks for the answers.
> >>
> >> I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for         how to:
> >> - increase the resources count
> >> - add expire headers for the images
> >>
> >> ?
> >>
> >> Cheers,
> >> Doru
> >>
> >>
> >> On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker <[hidden email]> wrote:
> >> I suspect James has the answer but you might also consider doing the
> >> following:
> >>
> >> -Add expires headers for the images in Apache and people will only have
> >> to download them once.
> >>
> >> -Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
> >> upgrading to the latest stable version just to get the security
> >> vulnerability fixes.
> >>
> >>
> >>
> >> On 11/25/2012 08:11 PM, James Foster wrote:
> >> > Hi Doru,
> >> >
> >> > How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
> >> >
> >> > James
> >> >
> >> > On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
> >> >
> >> >> Thanks. But, somehow, I think size is not really the issue.
> >> >>
> >> >> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
> >> >>
> >> >> And yes, I am using the timeline debugging functionality from the browser.
> >> >>
> >> >> It's strange.
> >> >>
> >> >> Doru
> >> >>
> >> >> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
> >> >>
> >> >>> Hi Doru,
> >> >>>
> >> >>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
> >> >>> I tried it with home-icons-400-200-37.png.
> >> >>> Before: 31.092 Bytes
> >> >>> After: 7.678 Bytes
> >> >>>
> >> >>> Cheers
> >> >>> Gerhard
> >> >>>
> >> >>>
> >> >>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
> >> >>> Hi,
> >> >>>
> >> >>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
> >> >>>
> >> >>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
> >> >>>
> >> >>> The example is here:
> >> >>> http://www.humane-assessment.com/
> >> >>>
> >> >>> Anyone has any idea of why this would happen?
> >> >>>
> >> >>> Cheers,
> >> >>> Doru
> >> >>>
> >> >>>
> >> >>> --
> >> >>> www.tudorgirba.com
> >> >>>
> >> >>> "Live like you mean it."
> >> >>>
> >> >>> _______________________________________________
> >> >>> seaside mailing list
> >> >>> [hidden email]
> >> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >> >>>
> >> >>> _______________________________________________
> >> >>> seaside mailing list
> >> >>> [hidden email]
> >> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >> >>
> >> >> --
> >> >> www.tudorgirba.com
> >> >>
> >> >> "We can create beautiful models in a vacuum.
> >> >> But, to get them effective we have to deal with the inconvenience of reality."
> >> >>
> >> >> _______________________________________________
> >> >> seaside mailing list
> >> >> [hidden email]
> >> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >> >>
> >> >
> >> > _______________________________________________
> >> > seaside mailing list
> >> > [hidden email]
> >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >> >
> >>
> >> _______________________________________________
> >> seaside mailing list
> >> [hidden email]
> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >>
> >>
> >>
> >> --
> >> www.tudorgirba.com
> >>
> >> "Every thing has its own flow"
> >>
> >>
> >>
> >> _______________________________________________
> >> seaside mailing list
> >>
> >> [hidden email]
> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> > <www.humane-assessmen>_______________________________________________
> > seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> --
> www.tudorgirba.com
>
> "Problem solving should be focused on describing
> the problem in a way that makes the solution obvious."
>
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

--
www.tudorgirba.com

"Beauty is where we see it."



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Tudor Girba-2
In reply to this post by Bob Arning-2
Hi Bob,

I changed the KeepAliveTimeout to 1. The situation improved significantly in that the delay is now just 1 sec :).

I will look into changing the ordering.

Cheers,
Doru


On 27 Nov 2012, at 21:29, Bob Arning <[hidden email]> wrote:

> Doru,
>
> Here are some suggestions:
>
> 1. Is it a browser issue? I'm seeing it in Chrome - MacOS 10.7.
> 2. See if tinkering with apache's keep-alive makes a difference. In /etc/apache2/httpd.conf (on a mac, anyway), there is this:
>
> # KeepAlive: Whether or not to allow persistent connections (more than
> # one request per connection). Set to "Off" to deactivate.
> #
> KeepAlive On
>
> # KeepAliveTimeout: Number of seconds to wait for the next request from the
> # same client on the same connection.
> #
> KeepAliveTimeout 15
>
> so try a bigger number or turning it off. I think you need to stop & restart apache for this to take effect.
>
> 3. How easy is it to take apache out of the loop and serve directly from Seaside?
> 4. Paul mentions moving some javascript - I looked at the audits tab in the Chrome developer tools and it said this about your page:
>
> Optimize the order of styles and scripts (3)
>
>     The following external CSS files were included after an external JavaScript file in the document head. To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript.
>         bootstrap.min.css
>         bootstrap-responsive.min.css
>         style.css
>
> so maybe moving that kavascript is something to try.
>
> Cheers,
> Bob
>
> P.S. I updated my squeak test to reuse sockets and still had no problem, so it looks more and more like something the browser is doing beyond just getting a bunch of files.
>
>
> On 11/27/12 2:34 PM, Tudor Girba wrote:
>> Hi Bob and James,
>>
>> Thanks again.
>>
>> It seems to be that the 15s is too much of a coincidence :).
>>
>> I put together two experiments that show that the loading problem depends on the amount of images:
>>
>> - a page with 3 extra images on top of the template. This seems to exhibit the problem for exactly one slow loading image:
>>
>> http://www.humane-assessment.com/test3ExtraImages
>>
>>
>> - a page with only 1 extra image on top of the template. This loads fine:
>>
>> http://www.humane-assessment.com/testOneExtraImage
>>
>>
>>
>> But, I still do not quite understand where to look next. Any further advice?
>>
>> Cheers,
>> Doru
>>
>>
>> On 26 Nov 2012, at 20:41, Bob Arning
>> <[hidden email]>
>>  wrote:
>>
>>
>>> I wrote a Squeak simulation of the browser loading 14 of the files on your page. I used a separate process for each httpGet: and typically were complete in under 1.5 seconds. When I hit reload on the browser, there are often 1 or 2 files taking a bit over 15 seconds. Suggests something different about how the browser requests data vs. my simple simulation.
>>>
>>> Interesting that the response headers are:
>>>
>>> HTTP/1.1 304 Not Modified
>>> Date: Mon, 26 Nov 2012 19:19:23 GMT
>>> Server: Apache/2.2.8 (Ubuntu)
>>> Connection: Keep-Alive
>>> Keep-Alive: timeout=15, max=100
>>> ETag: "392802a-7974-4cf387f145600"
>>>
>>> Is it just a coincidence that the keep-alive timeout is 15 seconds and that the slow files take 15.7 seconds? Attached is an HAR file with the browser timing details.
>>>
>>> Cheers,
>>> Bob
>>>
>>> On 11/26/12 4:27 AM, Tudor Girba wrote:
>>>
>>>> Hi Paul, hi James,
>>>>
>>>> Thanks for the answers.
>>>>
>>>> I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for         how to:
>>>> - increase the resources count
>>>> - add expire headers for the images
>>>>
>>>> ?
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker
>>>> <[hidden email]>
>>>>  wrote:
>>>> I suspect James has the answer but you might also consider doing the
>>>> following:
>>>>
>>>> -Add expires headers for the images in Apache and people will only have
>>>> to download them once.
>>>>
>>>> -Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
>>>> upgrading to the latest stable version just to get the security
>>>> vulnerability fixes.
>>>>
>>>>
>>>>
>>>> On 11/25/2012 08:11 PM, James Foster wrote:
>>>>
>>>>> Hi Doru,
>>>>>
>>>>> How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
>>>>>
>>>>> James
>>>>>
>>>>> On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
>>>>>
>>>>>
>>>>>> Thanks. But, somehow, I think size is not really the issue.
>>>>>>
>>>>>> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>>>>>>
>>>>>> And yes, I am using the timeline debugging functionality from the browser.
>>>>>>
>>>>>> It's strange.
>>>>>>
>>>>>> Doru
>>>>>>
>>>>>> On 24 Nov 2012, at 10:26, Gerhard Obermann
>>>>>> <[hidden email]>
>>>>>>  wrote:
>>>>>>
>>>>>>
>>>>>>> Hi Doru,
>>>>>>>
>>>>>>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>>>>>>> I tried it with home-icons-400-200-37.png.
>>>>>>> Before: 31.092 Bytes
>>>>>>> After: 7.678 Bytes
>>>>>>>
>>>>>>> Cheers
>>>>>>> Gerhard
>>>>>>>
>>>>>>>
>>>>>>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba
>>>>>>> <[hidden email]>
>>>>>>>  wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>>>>>>>
>>>>>>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>>>>>>>
>>>>>>> The example is here:
>>>>>>>
>>>>>>> http://www.humane-assessment.com/
>>>>>>>
>>>>>>>
>>>>>>> Anyone has any idea of why this would happen?
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Doru
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> www.tudorgirba.com
>>>>>>>
>>>>>>>
>>>>>>> "Live like you mean it."
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> seaside mailing list
>>>>>>>
>>>>>>> [hidden email]
>>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> seaside mailing list
>>>>>>>
>>>>>>> [hidden email]
>>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>> --
>>>>>>
>>>>>> www.tudorgirba.com
>>>>>>
>>>>>>
>>>>>> "We can create beautiful models in a vacuum.
>>>>>> But, to get them effective we have to deal with the inconvenience of reality."
>>>>>>
>>>>>> _______________________________________________
>>>>>> seaside mailing list
>>>>>>
>>>>>> [hidden email]
>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>>
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> seaside mailing list
>>>>>
>>>>> [hidden email]
>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> seaside mailing list
>>>>
>>>> [hidden email]
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> www.tudorgirba.com
>>>>
>>>>
>>>> "Every thing has its own flow"
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> seaside mailing list
>>>>
>>>>
>>>> [hidden email]
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>> <www.humane-assessmen
>>> >_______________________________________________
>>> seaside mailing list
>>>
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> --
>>
>> www.tudorgirba.com
>>
>>
>> "Problem solving should be focused on describing
>> the problem in a way that makes the solution obvious."
>>
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>>
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

--
www.tudorgirba.com

"Problem solving efficiency grows with the abstractness level of problem understanding."



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Gastón Dall' Oglio
In reply to this post by Paul DeBruicker
Hello.



2012/11/27 Paul DeBruicker <[hidden email]>
It looks like the images aren't loaded until after the Javascript is
loaded and compilied.  Can you move the javascript to the end of the
document rather than having it in the HEAD?  I don't use pier so don't
know if that's easy or not.  Also the bootstrap JS relies upon jQuery so
you might benefit from having jQuery load first.  Not sure about the
pier.js stuff.


I just use a component at the end of the page with a render method like

addJsToPage:html
        html script resourceUrl:'js/JQuery.minjs'.
        html script resourceUrl: 'js/site.js'

at the base of my main component to load JS at the end.



For full control of where (in head or body) and the order in that the external resources are loaded in Pier based apps, instead to use Libraries configuration, I make a PierFrame subclass like this:

PRPierFrame subclass: #MyPierFrame.

MyPierFrame>>renderContentOn: html
   super renderContentOn: html. "this render Pier components..."
   html script resourceUrl:'js/JQuery.minjs'.   "Load resources at end of body"
   html script resourceUrl: 'js/site.js'
html document addLoadScript: ((html jQuery: '*[title]') removeAttribute: 'title')
   
Then I register this class as root component in the app.


This is 

my 2cents.

Regards.


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: slow picture loading

Tudor Girba-2
In reply to this post by Paul DeBruicker
Hi Paul.

I am not so sure about it being a Javascript issue, given that lowering the KeepAliveTimeout improves the situation.

Nevertheless, I will look into enhancing the order because that is obviously a problem, too. Thanks.

Cheers,
Doru


On 27 Nov 2012, at 21:15, Paul DeBruicker <[hidden email]> wrote:

> It looks like the images aren't loaded until after the Javascript is
> loaded and compilied.  Can you move the javascript to the end of the
> document rather than having it in the HEAD?  I don't use pier so don't
> know if that's easy or not.  Also the bootstrap JS relies upon jQuery so
> you might benefit from having jQuery load first.  Not sure about the
> pier.js stuff.
>
>
>
> I just use a component at the end of the page with a render method like
>
> addJsToPage:html
> html script resourceUrl:'js/JQuery.minjs'.
> html script resourceUrl: 'js/site.js'
>
> at the base of my main component to load JS at the end.
>
>
> also there is a 'yslow' addon for firefox/chrome that may help trouble
> shoot why the page is slow.  Its from Yahoo here:
>
> http://yslow.org/
>
>
>
>
>
> On 11/27/2012 11:34 AM, Tudor Girba wrote:
>> Hi Bob and James,
>>
>> Thanks again.
>>
>> It seems to be that the 15s is too much of a coincidence :).
>>
>> I put together two experiments that show that the loading problem depends on the amount of images:
>>
>> - a page with 3 extra images on top of the template. This seems to exhibit the problem for exactly one slow loading image:
>> http://www.humane-assessment.com/test3ExtraImages
>>
>> - a page with only 1 extra image on top of the template. This loads fine:
>> http://www.humane-assessment.com/testOneExtraImage
>>
>>
>> But, I still do not quite understand where to look next. Any further advice?
>>
>> Cheers,
>> Doru
>>
>>
>> On 26 Nov 2012, at 20:41, Bob Arning <[hidden email]> wrote:
>>
>>> I wrote a Squeak simulation of the browser loading 14 of the files on your page. I used a separate process for each httpGet: and typically were complete in under 1.5 seconds. When I hit reload on the browser, there are often 1 or 2 files taking a bit over 15 seconds. Suggests something different about how the browser requests data vs. my simple simulation.
>>>
>>> Interesting that the response headers are:
>>>
>>> HTTP/1.1 304 Not Modified
>>> Date: Mon, 26 Nov 2012 19:19:23 GMT
>>> Server: Apache/2.2.8 (Ubuntu)
>>> Connection: Keep-Alive
>>> Keep-Alive: timeout=15, max=100
>>> ETag: "392802a-7974-4cf387f145600"
>>>
>>> Is it just a coincidence that the keep-alive timeout is 15 seconds and that the slow files take 15.7 seconds? Attached is an HAR file with the browser timing details.
>>>
>>> Cheers,
>>> Bob
>>>
>>> On 11/26/12 4:27 AM, Tudor Girba wrote:
>>>> Hi Paul, hi James,
>>>>
>>>> Thanks for the answers.
>>>>
>>>> I also thought it has to do with the Apache config, but I had no idea what to look for. Your suggestion certainly look interesting to look into, but I have close to no clue of how to do it. Do you happen to have a bit more hands-on pointers for         how to:
>>>> - increase the resources count
>>>> - add expire headers for the images
>>>>
>>>> ?
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> On Mon, Nov 26, 2012 at 5:28 AM, Paul DeBruicker <[hidden email]> wrote:
>>>> I suspect James has the answer but you might also consider doing the
>>>> following:
>>>>
>>>> -Add expires headers for the images in Apache and people will only have
>>>> to download them once.
>>>>
>>>> -Apache 2.2.8 was released Jan 19, 2008 so I'd definitely spend time
>>>> upgrading to the latest stable version just to get the security
>>>> vulnerability fixes.
>>>>
>>>>
>>>>
>>>> On 11/25/2012 08:11 PM, James Foster wrote:
>>>>> Hi Doru,
>>>>>
>>>>> How many resources do you have loading from the same site? Once I had a problem in which Apache was configured (by default) to only provide ten (10) items per second to the same client. I believe this was an attempt to avoid a denial-of-service attack. When I changed Apache to allow 30 items per second then my site loaded much faster.
>>>>>
>>>>> James
>>>>>
>>>>> On Nov 25, 2012, at 3:24 PM, Tudor Girba wrote:
>>>>>
>>>>>> Thanks. But, somehow, I think size is not really the issue.
>>>>>>
>>>>>> Somehow randomly, one or two of the pictures take significantly more (the delta is measured in seconds) to load than the others.
>>>>>>
>>>>>> And yes, I am using the timeline debugging functionality from the browser.
>>>>>>
>>>>>> It's strange.
>>>>>>
>>>>>> Doru
>>>>>>
>>>>>> On 24 Nov 2012, at 10:26, Gerhard Obermann <[hidden email]> wrote:
>>>>>>
>>>>>>> Hi Doru,
>>>>>>>
>>>>>>> I would reduce the image size to the displayed size and reduce the bit depth of the png to 8.
>>>>>>> I tried it with home-icons-400-200-37.png.
>>>>>>> Before: 31.092 Bytes
>>>>>>> After: 7.678 Bytes
>>>>>>>
>>>>>>> Cheers
>>>>>>> Gerhard
>>>>>>>
>>>>>>>
>>>>>>> On Sat, Nov 24, 2012 at 8:29 AM, Tudor Girba <[hidden email]> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am working on a pier page, and I have a couple of images in it that seem to be slow to load, although they are served through apache.
>>>>>>>
>>>>>>> It is true that the images are slightly large (~230K), but still I think they appear too slow.
>>>>>>>
>>>>>>> The example is here:
>>>>>>> http://www.humane-assessment.com/
>>>>>>>
>>>>>>> Anyone has any idea of why this would happen?
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Doru
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> www.tudorgirba.com
>>>>>>>
>>>>>>> "Live like you mean it."
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> seaside mailing list
>>>>>>> [hidden email]
>>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> seaside mailing list
>>>>>>> [hidden email]
>>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>>
>>>>>> --
>>>>>> www.tudorgirba.com
>>>>>>
>>>>>> "We can create beautiful models in a vacuum.
>>>>>> But, to get them effective we have to deal with the inconvenience of reality."
>>>>>>
>>>>>> _______________________________________________
>>>>>> seaside mailing list
>>>>>> [hidden email]
>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> seaside mailing list
>>>>> [hidden email]
>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>
>>>>
>>>> _______________________________________________
>>>> seaside mailing list
>>>> [hidden email]
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>
>>>>
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "Every thing has its own flow"
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> seaside mailing list
>>>>
>>>> [hidden email]
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>> <www.humane-assessmen>_______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> --
>> www.tudorgirba.com
>>
>> "Problem solving should be focused on describing
>> the problem in a way that makes the solution obvious."
>>
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

--
www.tudorgirba.com

"Value is always contextual."



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
12