Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 80840 invoked from network); 19 Apr 2006 04:15:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Apr 2006 04:15:57 -0000 Received: (qmail 84018 invoked by uid 500); 19 Apr 2006 04:15:55 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 83977 invoked by uid 500); 19 Apr 2006 04:15:55 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 83966 invoked by uid 99); 19 Apr 2006 04:15:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2006 21:15:55 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [210.245.32.200] (HELO mail.fts-vn.com) (210.245.32.200) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2006 21:15:54 -0700 Received: from sg0104.fts-vn.com ([172.16.1.32]) by mail.fts-vn.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1FW46D-0006qC-4A for dev@ant.apache.org; Wed, 19 Apr 2006 11:15:29 +0700 Message-ID: <4445B9F5.5080400@it.fts-vn.com> Date: Wed, 19 Apr 2006 11:17:57 +0700 From: Kev Jackson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Developers List Subject: 1.7 Memory usage > 1.6.5 Memory usage Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 {--} X-Spam-Report: Spam detection software, running on the system "mail.fts-vn.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Just trying to reduce the amount of temporary objects created on the heap to resolve this OutOfMemory issue with AppFuse, and with the 1.6.5 source, I can reduce memory consumption by putting a guard around when Strings are created for logging eg: [...] Content analysis details: (-2.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.8 ALL_TRUSTED Did not pass through any untrusted hosts 0.0 AWL AWL: From: address is in the auto white-list X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Just trying to reduce the amount of temporary objects created on the heap to resolve this OutOfMemory issue with AppFuse, and with the 1.6.5 source, I can reduce memory consumption by putting a guard around when Strings are created for logging eg: log("Copying "+fromFile+" to "+toFile, verbosity) becomes StringBuffer sb = new StringBuffer("Copying ").append(fromFile).append(" to "); ... (code elided) //not the same behaviour, but need to try and see : don't log unless user wants debug output if (verbosity >= Project.MSG_DEBUG) { log(sb.append(toFile).toString(), verbosity); } This helps as the strings aren't created at all unless the verbosity is set to DEBUG, however, in Ant 1.7, even with this change, there is an OutOfMemory error. Basically some of the 1.7 tasks are consuming much more memory than the 1.6.5 codebase. In general though, the logging mechanism is always going to create a lot of temporary cruft as it stands, and this is perhaps one area where there could be some refactoring? --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org