Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 69253 invoked from network); 2 Nov 2004 11:28:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Nov 2004 11:28:46 -0000 Received: (qmail 92155 invoked by uid 500); 2 Nov 2004 11:28:29 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 92079 invoked by uid 500); 2 Nov 2004 11:28:28 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 92063 invoked by uid 99); 2 Nov 2004 11:28:28 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [62.192.67.250] (HELO alpha.eurodyn.com) (62.192.67.250) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 02 Nov 2004 03:28:28 -0800 Received: from parnitha.eurodyn.com (parnitha.eurodyn.com [10.251.0.3]) by alpha.eurodyn.com (8.12.9/8.12.9) with ESMTP id iA2BSFep018620 for ; Tue, 2 Nov 2004 13:28:15 +0200 (EET) Received: by parnitha.eurodyn.com with ESMTP id NAA19115; Tue, 2 Nov 2004 13:28:15 +0200 (EET) Received: from [10.254.255.58] (account emmanouil.batsis [10.254.255.58] verified) by eurodyn.com (CommuniGate Pro SMTP 4.0.5) with ESMTP id 1758737 for commons-user@jakarta.apache.org; Tue, 02 Nov 2004 13:28:14 +0200 Message-ID: <41876F5A.30906@eurodyn.com> Date: Tue, 02 Nov 2004 13:28:26 +0200 From: Emmanouil Batsis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: [JXPath] Compiled Expressions Cache Impl? (was: Re: JXPath: Thread-Safe Behavior and Real-Time Applications) References: <20041028211414.92552.qmail@web11701.mail.yahoo.com> In-Reply-To: <20041028211414.92552.qmail@web11701.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, Dmitri Plotnikov wrote: >JXPath maintains a global cache of those. Since that cache is of limited size and is shared by all threads, the performance may suffer when all these threads start storing their load of XPaths in that cache. What I would recommend is disabling the automatic caching (for that there is a global variable on JXPathContextImpl) and maintain application's own cache of compiled expressions. > Thanks for the above, *very* informative as I also have thread-safety requirements on XML trees of unknown structure and size. I was thinking of implementing a statistics-and-total-cache-size-based mechanism to figure out frequently used expressions, then store those, but I'm not sure how accessible the JXPath cache is (can i selectively store and remove compiled expressions?), or how easily another cache can be implemented and what that should be like... any suggestions? Many thanks, Manos --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org