Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 30CD49990 for ; Thu, 23 Feb 2012 08:11:42 +0000 (UTC) Received: (qmail 66999 invoked by uid 500); 23 Feb 2012 08:11:42 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 66945 invoked by uid 500); 23 Feb 2012 08:11:41 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 66930 invoked by uid 99); 23 Feb 2012 08:11:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 08:11:41 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=FSL_RCVD_USER,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [60.234.4.75] (HELO nctlincom02.orcon.net.nz) (60.234.4.75) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 08:11:31 +0000 Received: from mx9.orcon.net.nz (mx9.orcon.net.nz [219.88.242.59]) by nctlincom02.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id q1N8BIYR012815 for ; Thu, 23 Feb 2012 21:11:18 +1300 Received: from Debian-exim by mx9.orcon.net.nz with local (Exim 4.69) (envelope-from ) id 1S0Tla-0004md-5l for user@cayenne.apache.org; Thu, 23 Feb 2012 21:11:06 +1300 Received: from [121.98.190.242] (helo=matai.local) by mx9.orcon.net.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1S0TlZ-0004mV-TS for user@cayenne.apache.org; Thu, 23 Feb 2012 21:11:06 +1300 Message-ID: <4F45F499.6040106@lindesay.co.nz> Date: Thu, 23 Feb 2012 21:11:05 +1300 From: Andrew Lindesay User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: user@cayenne.apache.org Subject: Re: Question on ObjectContext and Deserialization References: <4F3A37C9.2080708@lindesay.co.nz> <199079C1-27EA-4F09-A9B2-736A45DBF5D4@objectstyle.org> <4F3E299E.8040807@lindesay.co.nz> <7C266DED-920A-4D14-BE77-ACD29C4907D0@objectstyle.org> <4F3ED9C8.2070906@lindesay.co.nz> <4F44C4B9.20308@lindesay.co.nz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DSPAM-Check: by mx9.orcon.net.nz on Thu, 23 Feb 2012 21:11:06 +1300 X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Thu Feb 23 21:11:06 2012 X-DSPAM-Confidence: 0.6100 X-DSPAM-Probability: 0.0000 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN, default) X-Spam-Score: 0.00 () [Hold at 5.00] X-CanIt-Geo: ip=121.98.190.242; country=NZ; region=E7; city=Auckland; latitude=-36.8667; longitude=174.7667; http://maps.google.com/maps?q=-36.8667,174.7667&z=6 X-CanItPRO-Stream: base:default X-Canit-Stats-ID: 05GBkbiVk - 68df26ad0f3d - 20120223 X-Scanned-By: CanIt (www . roaringpenguin . com) on 172.16.100.175 X-Virus-Checked: Checked by ClamAV on apache.org Hi Andrus; For what it is worth; I have tested commons 3.1 and 3.2 with a small test rig and the problem appears to be gone in 3.2 -- although not needing to serialize at all would be ideal if you can see a way forward that way! Regards; On 23/02/12 12:22 AM, Andrus Adamchik wrote: > I think we can improve deserialization performance in general and solve this specific issue if we make ObjectStore.objectMap (this is the AbstractReferenceMap causing trouble) transient. There's no value is saving and restoring this map. There's another map called "changes", which is a regular HashMap, and that needs to be preserved. > Now the implementation can be a little tricky, as "objectMap" is provided by the DI factory and we need to create an empty map of the same type on deserialization. This may require refactoring of ObjectStore creation flow. Should be doable though... -- Andrew Lindesay www.silvereye.co.nz