You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Adam Schrotenboer <ad...@yahoo-inc.com> on 2011/05/10 23:39:11 UTC

[users@httpd] flush(STDOUT) + mod_deflate - was: mix pre-compressed and mod_deflate

On 05/10/2011 11:14 AM, Adam Schrotenboer wrote:
> I have a reasonably working mod_rewrite solution for serving
> pre-compressed files. But if I enable mod_deflate, it seems to override
> my mod_rewrite method.
>
> Basic problem is this:
> serving jquery.js with mod_deflate takes 1sec to load, serving it
> pre-compressed (and mod_deflate disabled) takes 180msec to load.
> With mod_rewrite + mod_deflate enabled, I get the same 1sec to load this
> file.
>
> So I want to pre-compress some files, and have the rest be compressed on
> the fly. How do I make mod_deflate get out of the way for pre-compressed
> files?
>
After more playing with it, the high latency under mod_deflate is caused
by the change required to make 'flush' work (setting a low SetOutputBuffer).

I'm _trying_ to make the javascript start being loaded while the CGI
finishes putting together the page. It seems I can have one or the other
(working flush, or fast mod_deflate).

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] flush(STDOUT) + mod_deflate - was: mix pre-compressed and mod_deflate

Posted by Adam Schrotenboer <ad...@yahoo-inc.com>.
On 05/10/2011 02:46 PM, Macks, Aaron wrote:
> Can you have the .js get called from a different VHOST (probably will need a FQ url) and configure the "static" vhost and the "cgi" vhost each tuned to the specific purpose
>


An interesting idea, but that seems that it would require 2 VMs (I tried
putting a SetOutputBuffer in a <Directory>, but it refuses that context,
so i'm guessing it'll reject a <virtualhost> as well), and that would
never pass review for deployment.

I'm tempted to try setting this one CGI to no-gzip, as it's not that
much content (most of the content is the javascripts and json files).
just ~30kb.
and I can also try pre-compressing the JSON files.

> A
> --
> Aaron Macks
> Sr. Unix Systems Engineer
>
> Harvard Business Publishing
> 300 North Beacon St.    |   Watertown, MA 02472
> (617) 783-7461          |   Fax: (617) 783-7467
> www.harvardbusiness.org |   Cell:(978) 317-3614
>
> On May 10, 2011, at 5:39 PM, Adam Schrotenboer wrote:
>
>> On 05/10/2011 11:14 AM, Adam Schrotenboer wrote:
>>> I have a reasonably working mod_rewrite solution for serving
>>> pre-compressed files. But if I enable mod_deflate, it seems to override
>>> my mod_rewrite method.
>>>
>>> Basic problem is this:
>>> serving jquery.js with mod_deflate takes 1sec to load, serving it
>>> pre-compressed (and mod_deflate disabled) takes 180msec to load.
>>> With mod_rewrite + mod_deflate enabled, I get the same 1sec to load this
>>> file.
>>>
>>> So I want to pre-compress some files, and have the rest be compressed on
>>> the fly. How do I make mod_deflate get out of the way for pre-compressed
>>> files?
>>>
>> After more playing with it, the high latency under mod_deflate is caused
>> by the change required to make 'flush' work (setting a low SetOutputBuffer).
>>
>> I'm _trying_ to make the javascript start being loaded while the CGI
>> finishes putting together the page. It seems I can have one or the other
>> (working flush, or fast mod_deflate).
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] flush(STDOUT) + mod_deflate - was: mix pre-compressed and mod_deflate

Posted by "Macks, Aaron" <am...@harvardbusiness.org>.
Can you have the .js get called from a different VHOST (probably will need a FQ url) and configure the "static" vhost and the "cgi" vhost each tuned to the specific purpose

A
--
Aaron Macks
Sr. Unix Systems Engineer

Harvard Business Publishing
300 North Beacon St.    |   Watertown, MA 02472
(617) 783-7461                |   Fax: (617) 783-7467
www.harvardbusiness.org |   Cell:(978) 317-3614

On May 10, 2011, at 5:39 PM, Adam Schrotenboer wrote:

> On 05/10/2011 11:14 AM, Adam Schrotenboer wrote:
>> I have a reasonably working mod_rewrite solution for serving
>> pre-compressed files. But if I enable mod_deflate, it seems to override
>> my mod_rewrite method.
>> 
>> Basic problem is this:
>> serving jquery.js with mod_deflate takes 1sec to load, serving it
>> pre-compressed (and mod_deflate disabled) takes 180msec to load.
>> With mod_rewrite + mod_deflate enabled, I get the same 1sec to load this
>> file.
>> 
>> So I want to pre-compress some files, and have the rest be compressed on
>> the fly. How do I make mod_deflate get out of the way for pre-compressed
>> files?
>> 
> After more playing with it, the high latency under mod_deflate is caused
> by the change required to make 'flush' work (setting a low SetOutputBuffer).
> 
> I'm _trying_ to make the javascript start being loaded while the CGI
> finishes putting together the page. It seems I can have one or the other
> (working flush, or fast mod_deflate).
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org