Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59BB79F7D for ; Fri, 8 Jun 2012 15:48:07 +0000 (UTC) Received: (qmail 65531 invoked by uid 500); 8 Jun 2012 15:48:06 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 65418 invoked by uid 500); 8 Jun 2012 15:48:06 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 65408 invoked by uid 99); 8 Jun 2012 15:48:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 15:48:06 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Charles_Honton@intuit.com designates 206.108.40.8 as permitted sender) Received: from [206.108.40.8] (HELO qdcapmail2.data.ie.intuit.net) (206.108.40.8) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 15:48:01 +0000 DomainKey-Signature: s=default; d=intuit.com; c=nofws; q=dns; h=X-SBRS:X-IronPort-AV:Received:Received:From:To:Subject: Thread-Topic:Thread-Index:Date:Message-ID:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:user-agent:x-originating-ip: Content-Type:Content-ID:Content-Transfer-Encoding: MIME-Version; b=hlTTDghkQ02WpltQPUqNU2EncHjEBxS6OXYF17hY4Twah8j528xl6xnr iFHEolOmwR9mzBuhZr466pgkhUb/Bw/pSa+cuDdIvsINlYcPQIvUKJs6w FvGLTKyk39n5Q2T; DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intuit.com; i=Charles_Honton@intuit.com; q=dns/txt; s=default; t=1339170481; x=1370706481; h=from:to:subject:date:message-id:in-reply-to:content-id: content-transfer-encoding:mime-version; bh=erZ1svihKw1ueZUa2YgQoh9i+7ythIEdROxXbw4HqME=; b=VVPr+qOjRUBlEV3kcl3fNnowu9Shj0NcPgLz4UGTbGaiR/6hOuEFOFCn qNyvu86lsImnsZ2kcU5FxI8gaE3/rtCTtCfrB8Ed3AxlbHQBGVnSefIqV jgQYyoCoEQwtltF; X-SBRS: None X-IronPort-AV: E=Sophos;i="4.75,738,1330934400"; d="scan'208";a="142150620" Received: from qynprdexhubap02.data.corp.intuit.net (HELO QYNPRDEXHUBAP02.corp.intuit.net) ([10.136.19.160]) by qdcapmail2.data.ie.intuit.net with ESMTP/TLS/AES128-SHA; 08 Jun 2012 08:47:41 -0700 Received: from QYNPRDEXMBXAP04.corp.intuit.net ([fe80::e923:67f:882c:55c2]) by QYNPRDEXHUBAP02.corp.intuit.net ([fe80::51d0:750d:b945:30f%17]) with mapi id 14.01.0355.002; Fri, 8 Jun 2012 08:47:40 -0700 From: "Honton, Charles" To: Commons Developers List Subject: Re: [classscan] Metadata API discussion Thread-Topic: [classscan] Metadata API discussion Thread-Index: AQHNRCyxuQMRB39tKE6z5wVx6hwRHpbt9ceAgADAYwCAADzPgIAAzZsAgABCYYCAAAUggIAAi6MA Date: Fri, 8 Jun 2012 15:47:40 +0000 Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.2.120421 x-originating-ip: [10.136.18.4] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org In on my MacBook, I get the following counts for running just the unit tests: Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527) Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode) Cache: 1 BootstrapClassLoader: 1 WeakConcurrentHashMap: 1 MetaUrlClassLoader: 2 HashWeakReference: 5 FileClassLocation: 5 PrimitiveClass: 9 JarClassLocation: 27 SortedReadOnlySet: 38 BcelEnumProperty: 296 BcelProperty: 740 AnnotationMap$1: 3217 BcelAnnotation: 3417 BcelClass$1: 9251 DeferredMetaClass: 13620 BcelClass$3: 18232 BcelClass$2: 26096 BcelClass: 26774 ArrayMetaType: 33275 ReadOnlySet: 54240 BcelField: 110983 BcelMethod: 231549 BcelParameter: 264572 ClassMetaType: 607104 AnnotationMap: 633878 Regards, chas On 6/7/12 5:27 PM, "James Carman" wrote: >There can be quite a few if you have to have them for every class, >interface, annotation, method, field, etc. Then again if you just reuse 1 >adapter object all the time it wouldn't be that bad. You would just have >to >let users know that they cannot maintain references to those objects after >scanning is complete. >On Jun 7, 2012 8:10 PM, "sebb" wrote: > >> On 7 June 2012 21:11, James Carman wrote: >> > On Thu, Jun 7, 2012 at 3:56 AM, sebb wrote: >> >> >> >> Not sure I follow this. Why would an interface use extra memory? >> >> I can see that it might add a bit more to the static size of a class, >> >> but why would it add more to each instance of a class that uses it? >> >> >> > >> > It's not the interface itself. It's the fact that you have to have >> > more objects loaded into memory when you use the interface-based >> > approach. For example, if BCEL has some object that represents a >> > class' metadata, then we'll have to put some "adapter" object in front >> > of it that implements our metadata API interface and knows how to >> > speak BCEL-speak to extract the information. >> >> Yes, but again, surely there won't be all that many such objects? >> >> I think some tests should be done of the two approaches before >> deciding to abandon the interface-based design. >> >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >> > For additional commands, e-mail: dev-help@commons.apache.org >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >> For additional commands, e-mail: dev-help@commons.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org