Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 224 invoked from network); 26 Jan 2010 15:15:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jan 2010 15:15:01 -0000 Received: (qmail 86298 invoked by uid 500); 26 Jan 2010 15:15:01 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 86216 invoked by uid 500); 26 Jan 2010 15:15:00 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 86206 invoked by uid 99); 26 Jan 2010 15:15:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2010 15:15:00 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.211.190 as permitted sender) Received: from [209.85.211.190] (HELO mail-yw0-f190.google.com) (209.85.211.190) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2010 15:14:54 +0000 Received: by ywh28 with SMTP id 28so6774747ywh.29 for ; Tue, 26 Jan 2010 07:14:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=bjuuSu06BucHMshkLCiOs7gjhn1apOBtACRv3/Qi97Q=; b=ww016Ii2nQyx9stPwVV5msX52Q4+Z8XhgJgZM//KBUDfLRiMSSiKuNF8owGRgQQZ+O lq2eIA7uMKgKLehEjNJQGRtFS3Mfme7Q7IndiOtOzW6RoRBpC/ykmJl5DWROHHiZeXpg aqOoqpVCWI5I2bJly03afF2tsC+FFCgp9A/Cc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=SS4dM1LdFseWEu+QJOljZrOmM+/9FunAyqW1wUhc0ybyPS74aWgLHZNDiQl3/6SjZ5 dPNdzOSH2dhvS3JpDGAqE/toWrIJuuHlhE6EhQu2qbSfrWb8Uc7YL3tl7JRZqeJAK01c WiBKj+r3pvq9om1WB9hyJlzysY+tFTo0VVLmc= MIME-Version: 1.0 Received: by 10.101.138.5 with SMTP id q5mr10022398ann.158.1264518873109; Tue, 26 Jan 2010 07:14:33 -0800 (PST) In-Reply-To: References: <844257352.1259509400633.JavaMail.jira@brutus> <252493028.33431264492954629.JavaMail.jira@brutus.apache.org> <46aeb24f1001260234n2b04d14ev3bb22bf6f47670de@mail.gmail.com> <46aeb24f1001260551j16ed95d0pec87441bcc8b53a2@mail.gmail.com> From: Paul Davis Date: Tue, 26 Jan 2010 10:14:13 -0500 Message-ID: Subject: Re: [jira] Commented: (COUCHDB-583) storing attachments in compressed form and serving them in compressed form if accepted by the client To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Huh. Maybe we turned that off? We did sit down and do some tests for the speed/size tradeoffs of using compression. The call was just adding the compressed option to erlang:term_to_binary/2 before writing that to disk. I'm not seeing it either though. I reckon we just decided to go with no compression for speed. Paul Davis On Tue, Jan 26, 2010 at 9:55 AM, Filipe David Manana wrote: > Paul, > > I don't see anything on couch_file that does compression (looking at trunk). > I grepped all the couch .erl files for "gzip" and "zlib", and the only ones > who are using compression are from the replication feature. > $ egrep -nr 'gzip|zlib' *.erl > couch_rep_att.erl:66: if ContentEncoding =:= "gzip" -> > couch_rep_att.erl:67: zlib:gunzip(Data); > couch_rep_changes_feed.erl:64: headers = Source#http_db.headers -- > [{"Accept-Encoding", "gzip"}] > couch_rep_httpc.erl:202: "gzip" -> > couch_rep_httpc.erl:203: zlib:gunzip(Body); > > Doing a quick eye scan on couch_file, I don't find anything also. > Am I missing something? > On Tue, Jan 26, 2010 at 3:24 PM, Paul Davis > wrote: >> >> > I do have the same opinion as you, the code would affect many of the >> > parts >> > regarding the compression (specially couch_stream). For doc compression, >> > I >> > imagine it would touch more places, and also present some difficulties >> > to >> > assure compatibility with the previous DB file formats. >> >> Just a note that docs are already stored compressed on disk. >> Everything written through couch_file.erl gets a gzip compression >> level 6 applied if memory serves. Which suddenly makes me wonder if an >> optimization for attachment compression might benefit from turning >> that off during stream writes since the stream is already compressed. >> >> Just a couple random thoughts. >> >> Paul > > > > -- > Filipe David Manana, > fdmanana@gmail.com > PGP key - http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC569452B > > "Reasonable men adapt themselves to the world. > Unreasonable men adapt the world to themselves. > That's why all progress depends on unreasonable men." > >