Re: [Zope-dev] RAMCacheManager and gzip

2001-12-13 Thread Nicola Larosa

 I think I have figured out what I did wrong, but I now have compression
 working for IE


That's great! I was recently noticing that some web pages saved locally from 
within Mozilla were gzipped, so this thing is moderately widespread.

I think it would be a great addition to Zope. Particularly useful with all 
those blank lines in Page Templates' output. ;^)


 If anyone wants the patch to play with, drop me a line (It's a file to add
 to the PatchKit folder. PatchKit auto-loads all patches it finds - just
 restart Zope, or refresh PatchKit).

Yes, please, send it my way too. Time's also ripe to give a glance to PatchKit.


-- 
Mozilla will be around long after nobody can remember
just quite what Internet Explorer actually used to be.
   AirLace on Slashdot

Nicola Larosa - [EMAIL PROTECTED]



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] RAMCacheManager and gzip

2001-12-10 Thread Adrian Hungate

Ok, that was my though, so I have uninstalled IE6, just incase the install
was broken, and I will do some more testing tonight. I really need to put
this to one side in favour of another caching problem I have been asked to
look at though. I will probably pick it up again in a day or two.

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.

- Original Message -
From: Martijn Jacobs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 2:42 PM
Subject: Re: [Zope-dev] RAMCacheManager and gzip


  There is zlib support in Python, and it is used in Medusa already.
ZServer
  does not call it, but the compression stuff is there.
 
  There is one good reason not to use zlib though, Micro$oft Internet
  Distorter does not support content-encoding: gzip and for
content-encoding:
  compress it expects data to be compressed using the Unix compress
tool... (I
  think someone reported this already... oh well)

 Hmm, how does mod_gzip compress it then? In every request I get from IE
 includes the accept-encoding: gzip string, and apache is sending it
 gzip-compressed back. Do you mean that the mod_gzip is compressing it
 different then zlib?

 mart(ijn)






 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] RAMCacheManager and gzip

2001-12-10 Thread Adrian Hungate

Ok, I stand corrected (and with egg on my face for abusing zlib). The moral
of the story is that zlib.compress(data) is NOT the same as gzip data
browser (Which I guess I should have known). Thanks for the pointer Jan!

I think I have figured out what I did wrong, but I now have compression
working for IE

If anyone wants the patch to play with, drop me a line (It's a file to add
to the PatchKit folder. PatchKit auto-loads all patches it finds - just
restart Zope, or refresh PatchKit).

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.

- Original Message -
From: Adrian Hungate [EMAIL PROTECTED]
To: Martijn Jacobs [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 6:13 PM
Subject: Re: [Zope-dev] RAMCacheManager and gzip


 Ok, that was my though, so I have uninstalled IE6, just incase the install
 was broken, and I will do some more testing tonight. I really need to put
 this to one side in favour of another caching problem I have been asked to
 look at though. I will probably pick it up again in a day or two.

 Adrian...

 --
 Adrian Hungate

 All views expressed in this email are those of the whole world, however
some
 people don't realise this yet.

 - Original Message -
 From: Martijn Jacobs [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, December 10, 2001 2:42 PM
 Subject: Re: [Zope-dev] RAMCacheManager and gzip


   There is zlib support in Python, and it is used in Medusa already.
 ZServer
   does not call it, but the compression stuff is there.
  
   There is one good reason not to use zlib though, Micro$oft Internet
   Distorter does not support content-encoding: gzip and for
 content-encoding:
   compress it expects data to be compressed using the Unix compress
 tool... (I
   think someone reported this already... oh well)
 
  Hmm, how does mod_gzip compress it then? In every request I get from IE
  includes the accept-encoding: gzip string, and apache is sending it
  gzip-compressed back. Do you mean that the mod_gzip is compressing it
  different then zlib?
 
  mart(ijn)
 
 
 
 
 
 
  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )
 


 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] RAMCacheManager and gzip

2001-12-06 Thread Adrian Hungate

Just to let you know, I am looking at patching ZServer using my PatchKit
product to do Content-Encoding: ... stuff... anyone interested in testing
when I get it running?

(Probably a couple of days before I get a running version...)

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.

- Original Message -
From: JanStiller T-Online [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 31, 2001 4:50 AM
Subject: [Zope-dev] RAMCacheManager and gzip


 Hi,

 Is it possible to marry the RAMCacheManager and gzip?

 I'm just working on a little shop and - for speed's sake - do 'ram-cache'
 the article-listings and push all the Zope-Content through mod_gzip. With
 this combination, I'm getting it 3x faster in Zope and 5x faster over the
 wire (normally 64k). That's great so far. But I don't see any sense in
 zipping cached content over and over, so I tried to zip the cached data in
 RAMCacheManager. In my first attempt, i replaced:


 ZCache_get (RAMCacheManager.py):

 entry.access_count = entry.access_count + 1
 return entry.data

 with:

 entry.access_count = entry.access_count + 1
 ob.REQUEST.RESPONSE.setHeader('Content-Encoding','compress')
 return zlib.compress(entry.data)


 The results:

 1.
 This works with Mozilla 0.96 only for very small entry.data. When I set
 entry.data to 'XX', it works, but any real page gets
 'htmlbody/html/body' as the result.

 2.
 This doesn't seem work in IE alltogether. (with 'Content-Encoding: gzip' -
 zlib.compress != gzip!?)


 I'm willing to spend some days of work for this feature, but although I
have
 2 years experience in Python I'm quite new to Zope and Internet-RFC's
 and this is definitely a point, where I would appreciate some hints from
 more experienced Zope-programmers (or a product, of course -- or the
 statement, that this won't be possible... ;o)



 regards

 Jan Stiller


 P.S. sorry, if my words seems a bit confused, I'm more used to reading
than
 writing english...




 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] RAMCacheManager and gzip

2001-10-31 Thread Oliver Bleutgen

JanStiller T-Online wrote:

 Hi,
 
 Is it possible to marry the RAMCacheManager and gzip?
 
 I'm just working on a little shop and - for speed's sake - do 'ram-cache'
 the article-listings and push all the Zope-Content through mod_gzip. With
 this combination, I'm getting it 3x faster in Zope and 5x faster over the
 wire (normally 64k). That's great so far. But I don't see any sense in
 zipping cached content over and over, so I tried to zip the cached data in
 RAMCacheManager. 
 [...]


IMNSHO, mod_gzip does (can do) caching on its own (directives
mod_gzip_keep_workfiles and mod_gzip_temp_dir), and perhaps
it might work with mod_proxy in some intelligent way. Maybe
you might want to check this first before doing too much work.
Also be warned, there are certain kinds of documents which will
make problems when served compressed, like PDFs. While
you won't want to RAM-cached PDFs, it might occur that RAM-caching
and compressing do conflict.

cheers,
oliver




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )