X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A46389FA5F0 for ; Thu, 29 Jun 2006 20:08:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 86215-01 for ; Thu, 29 Jun 2006 20:08:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with SMTP id 5FBBA9FA5DD for ; Thu, 29 Jun 2006 20:08:28 -0300 (ADT) Received: (qmail 29041 invoked by uid 1112); 29 Jun 2006 23:08:27 -0000 Date: Thu, 29 Jun 2006 18:08:27 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary2.csoft.net To: Luis Vilar Flores cc: pgsql-jdbc@postgresql.org Subject: Re: bytea memory improvement In-Reply-To: <6C675D36-3097-4B3A-A4E5-319C2AAD5EAC@evolute.pt> Message-ID: References: <448EB28B.2020301@evolute.pt> <6C675D36-3097-4B3A-A4E5-319C2AAD5EAC@evolute.pt> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/137 X-Sequence-Number: 15417 On Wed, 28 Jun 2006, Luis Vilar Flores wrote: > Can any JDBC developer give some feedback about this patch ? Memory > usage is a real issue for a few applications ... > It looks like a reasonable thing to do, but could you give us some more details on the cost/benefits? Your original email said it cost an extra 30ms for 5MB of data on your machine. What's percentage of the original cost is this? Also you could be more clear on what percentage of memory this saves. For the worst case scenario your going to get four bytes of escaped data for every real byte so the total size of the original method would be 4 + 4 + 1 and for the new method 4 + 1, so a savings of 44%? Is that what you've calculated? Finally you haven't actually submitted a patch, you've just sent a modified copy of a whole file. Since it's a small file that changes infrequently it's not a big deal, but we prefer context diffs if you can. Kris Jurka