Return-Path: Delivered-To: apmail-xml-batik-dev-archive@www.apache.org Received: (qmail 71972 invoked from network); 27 Aug 2004 09:48:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 27 Aug 2004 09:48:03 -0000 Received: (qmail 28576 invoked by uid 500); 27 Aug 2004 09:48:03 -0000 Delivered-To: apmail-xml-batik-dev-archive@xml.apache.org Received: (qmail 28412 invoked by uid 500); 27 Aug 2004 09:48:02 -0000 Mailing-List: contact batik-dev-help@xml.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: batik-dev@xml.apache.org Delivered-To: mailing list batik-dev@xml.apache.org Received: (qmail 28396 invoked by uid 99); 27 Aug 2004 09:48:01 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org X-Virus-Scanned: by dragon-cgpav-clamav-v1.3b X-Spam-Status-LCSR: dragon spam scanned Message-ID: <412F033C.7060809@cs.rutgers.edu> Date: Fri, 27 Aug 2004 11:47:40 +0200 From: George Armhold User-Agent: Mozilla Thunderbird 0.6 (X11/20040519) X-Accept-Language: en-us, en MIME-Version: 1.0 To: batik-dev@xml.apache.org Subject: Re: Performance of Batik.dom.svg.SVGOMDocument.getById() References: <131A71243F0BF246A6FEAC95414AC11D556CD7@cceexc13.americas.cpqcorp.net> In-Reply-To: <131A71243F0BF246A6FEAC95414AC11D556CD7@cceexc13.americas.cpqcorp.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on spamfilter.rutgers.edu X-Spam-Level: X-Spam-Status: No, hits=-4.8 required=5.0 tests=BAYES_00,RATWR10_MESSID autolearn=no version=2.61 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sieker, Fritz wrote: > I used Jprobe and found that the biggest time sink was in > Batik.dom.svg.SVGOMDocument.getById(). > > [ ... ] > > As an experiment, I replaced the scan of "protected static Element > getById(String id, Node node)" by a hash table. > > [ ... ] > > The results were dramatic, with the > 20 minute load dropping to > just a few seconds. I ran into the same problem, came up with a similar solution, and got the same impressive speedup. Except I implemented my HashMap cache outside of Batik, in my own application space. Not to say that my solution was any better/worse, just "me too". Would be nice to see this optimization added to Batik in the proper way. --------------------------------------------------------------------- To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org For additional commands, e-mail: batik-dev-help@xml.apache.org