Return-Path: Delivered-To: apmail-xml-fop-dev-archive@www.apache.org Received: (qmail 4424 invoked from network); 13 Oct 2004 14:52:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Oct 2004 14:52:57 -0000 Received: (qmail 72590 invoked by uid 500); 13 Oct 2004 14:52:32 -0000 Delivered-To: apmail-xml-fop-dev-archive@xml.apache.org Received: (qmail 72206 invoked by uid 500); 13 Oct 2004 14:52:28 -0000 Mailing-List: contact fop-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: fop-dev@xml.apache.org Delivered-To: mailing list fop-dev@xml.apache.org Received: (qmail 72193 invoked by uid 99); 13 Oct 2004 14:52:28 -0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=DNS_FROM_RFC_ABUSE,FROM_ENDS_IN_NUMS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [216.109.118.86] (HELO web60107.mail.yahoo.com) (216.109.118.86) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 13 Oct 2004 07:52:25 -0700 Message-ID: <20041013145223.71134.qmail@web60107.mail.yahoo.com> Received: from [204.36.11.210] by web60107.mail.yahoo.com via HTTP; Wed, 13 Oct 2004 07:52:23 PDT Date: Wed, 13 Oct 2004 07:52:23 -0700 (PDT) From: Glen Mazza Subject: Re: Performance improvement in property consumption. To: fop-dev@xml.apache.org In-Reply-To: <416D060E.3020000@worldonline.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --- Finn Bock wrote: > Hi Team, > > I've put together another largish patch that changes > the way properties > and used by the FO objects, the layout managers and > the FOEventHandler > subclasses. > > > http://issues.apache.org/bugzilla/show_bug.cgi?id=31699 > > The performance increase is 42% while at the same > time using %27 less > memory. ... > All fo elements are required to > extract all the > properties that they need and to store the values as > instance fields in > the fo element. > I love the performance boost you're recording but have a philosophical issue of an "fo object needing a property"--it is really an issue of the *FOEventHandler subclass* that needs the properties--and some handlers need/implement more properties than others. So if we did this at the FO level, in effect, we'd have to (1) store an instance variable of every valid property for each FO, given that we wouldn't know whether the FOEventHandler's needs it beforehand, and (2) instead of the programmatic convenience of getPropString(PR_OFFICIAL_PROPERTY_NAME), we'd have to remember what each of the properties are named in the FO's (We can probably standardize these though.) Another clarification needed: when would the property list's memory get released--at the PageSequence level, or as soon as the FO is finished? Because the values of some FO's properties further downstream depend on an earlier FO's properties, we may not be able to release the memory when the earlier FO is finished. Or, (to support inheritance) we may need to store instance variables for what may be a very unlikely event of a child needing that value. Also, are there any other options for releasing this memory that you know of? Is there someway this .bind() or other releasing of memory can be done within the FOEventHandler subclasses, or at least within LayoutManager (forgetting about RTF) instead? Not ruling this out--just want to be the devil's advocate here. Thanks, Glen