Re: [Simple-support] any performance tricks?
Brought to you by:
niallg
|
From: Jim S. <ji...@fu...> - 2009-03-03 16:34:36
|
That's what I was initially thinking, but after stepping into the code, it looks to me like this is already being done. There's a cache of org.simpleframework.xml.core.Schema objects if I'm not wrong. Quirino Zagarese wrote: > Hi, > I was reading about performance improvements and I was thinking: > considered simple makes calls to various getAnnotation methods in > order to achieve serialization infos at each persister.write/read > call(if I'm not wrong), could caching annotations infos once at > classloading time be a solution? > Regards > > 2009/3/3 <Nia...@ub... <mailto:Nia...@ub...>> > > Hi, > > Does protobuf generate XML as a result of the serialization process? > There is definitely room for performance improvements in Simple. Its > been a while since I have done a release focused on such enhancements. > Since the introduction of namespaces there has been a slight lag in > performance. > > However, I have already begun a scanner framework based around > Javassist > which will hopefully provide a signifigant performance improvement > over > reflection. > > I think though it will be weeks rather than days before any > signifigant > improvements in this area are released. > > Niall > > -----Original Message----- > From: Jim Sermersheim [mailto:ji...@fu... > <mailto:ji...@fu...>] > Sent: 03 March 2009 15:53 > To: Gallagher, Niall-N > Cc: sim...@li... > <mailto:sim...@li...> > Subject: Re: [Simple-support] any performance tricks? > > You're right, the first serialization takes hundreds of ms. > > I should have mentioned that my test serializes the object a few > hundred > times (just to make sure *everything* is primed -- cache, hotspot, > etc.), then starts the timer and serializes it 10000 more times and > calculates an average time per serialization. > > protobuf is a different beast in that you build a template and it > generates your code for you. I prefer the more flexible > annotation-based > method of Simple, but might have to go with the speed of protobuf :( > > Nia...@ub... <mailto:Nia...@ub...> wrote: > > Hi, > > > > The first time you serialize or deserialize an object will be much > > slower that subsequent times. The best thing to do is write the > object > > > once, then start your timer and write it again. You will find the > > second time is much faster than the first. > > > > There is also a planned performance improvement for serialization, > > where I intend to reduce the impact of namespaces, which have added > > about 20% more overhead than needed. With regard to protobuf I > am not > > familiar with it. However you will find Simple as fast as JAXB or > Xstream. > > > > Niall > > > > -----Original Message----- > > From: Jim Sermersheim [mailto:ji...@fu... > <mailto:ji...@fu...>] > > Sent: 02 March 2009 19:07 > > To: sim...@li... > <mailto:sim...@li...> > > Subject: [Simple-support] any performance tricks? > > > > Hi, > > > > I'm evaluating Simple along with some other tools that will > serialize > > data for purposes of data transfer across a network. I much > prefer the > > > annotations-based way that Simple lets me prepare data for > > serialization to the other tool I'm evaluating (Google > protobuf), but > > the performance is becoming a determining factor. For example, a > > sample data structure which takes 1.53ms to encode with Simple only > > takes 0.048ms to encode with protobuf. > > > > I'm just doing a very simple standard annotation markup with > > @Attribute and @Element (the outer structure has a dozen fields > and a > > list of two inner structures, each having about a half-dozen > fields). > > Then I just use persister.write to serialize. > > > > I'm guessing maybe the reflection is taking a lot of time? Not > sure. > > But are there any known performance tips/tricks to know about with > > Simple? > > > > Thanks, > > > > Jim > > > > > > > > CONFIDENTIAL > > > > This document and attachments contain information from > Fusion-io, Inc. > > which is confidential and/or legally privileged. > > The information is intended only for the use of the individual or > > entity named on this transmission. > > If you are not the intended recipient, you are hereby notified that > > any disclosure, copying, distribution or taking of any action in > > reliance on the contents of this emailed information is strictly > > prohibited, and that the documents should be returned to Fusion-io, > Inc. immediately. > > In this regard, if you have received this email in error, please > > notify us by return email immediately. > > > > > ---------------------------------------------------------------------- > > -- > > ------ > > Open Source Business Conference (OSBC), March 24-25, 2009, San > > Francisco, CA -OSBC tackles the biggest issue in open source: Open > > Sourcing the Enterprise -Strategies to boost innovation and cut > costs > > with open source participation -Receive a $600 discount off the > > registration fee with the source code: SFAD > > http://p.sf.net/sfu/XcvMzF8H > > _______________________________________________ > > Simple-support mailing list > > Sim...@li... > <mailto:Sim...@li...> > > https://lists.sourceforge.net/lists/listinfo/simple-support > > Visit our website at http://www.ubs.com > > > > This message contains confidential information and is intended only > > for the individual named. If you are not the named addressee you > > should not disseminate, distribute or copy this e-mail. Please > notify > > > the sender immediately by e-mail if you have received this e-mail by > > mistake and delete this e-mail from your system. > > > > E-mails are not encrypted and cannot be guaranteed to be secure or > > error-free as information could be intercepted, corrupted, lost, > > destroyed, arrive late or incomplete, or contain viruses. The > sender > > therefore does not accept liability for any errors or omissions > in the > > > contents of this message which arise as a result of e-mail > transmission. > > If verification is required please request a hard-copy version. > This > > message is provided for informational purposes and should not be > > construed as a solicitation or offer to buy or sell any > securities or > > related financial instruments. > > > > UBS Limited is a company registered in England & Wales under company > > number 2035362, whose registered office is at 1 Finsbury Avenue, > > London, EC2M 2PP, United Kingdom. > > > > UBS AG (London Branch) is registered as a branch of a foreign > company > > under number BR004507, whose registered office is at > > 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. > > > > UBS Clearing and Execution Services Limited is a company > registered in > > > England & Wales under company number 03123037, whose registered > office > > > is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. > > > > > CONFIDENTIAL > > This document and attachments contain information from Fusion-io, Inc. > which is confidential and/or legally privileged. > The information is intended only for the use of the individual or > entity > named on this transmission. > If you are not the intended recipient, you are hereby notified > that any > disclosure, copying, distribution or taking of any action in > reliance on > the contents of this emailed information is strictly prohibited, and > that the documents should be returned to Fusion-io, Inc. immediately. > In this regard, if you have received this email in error, please > notify > us by return email immediately. > Visit our website at http://www.ubs.com > > This message contains confidential information and is intended only > for the individual named. If you are not the named addressee you > should not disseminate, distribute or copy this e-mail. Please > notify the sender immediately by e-mail if you have received this > e-mail by mistake and delete this e-mail from your system. > > E-mails are not encrypted and cannot be guaranteed to be secure or > error-free as information could be intercepted, corrupted, lost, > destroyed, arrive late or incomplete, or contain viruses. The sender > therefore does not accept liability for any errors or omissions in the > contents of this message which arise as a result of e-mail > transmission. > If verification is required please request a hard-copy version. This > message is provided for informational purposes and should not be > construed as a solicitation or offer to buy or sell any securities > or related financial instruments. > > UBS Limited is a company registered in England & Wales under company > number 2035362, whose registered office is at 1 Finsbury Avenue, > London, EC2M 2PP, United Kingdom. > > UBS AG (London Branch) is registered as a branch of a foreign company > under number BR004507, whose registered office is at > 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. > > UBS Clearing and Execution Services Limited is a company registered > in England & Wales under company number 03123037, whose registered > office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source > code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Simple-support mailing list > Sim...@li... > <mailto:Sim...@li...> > https://lists.sourceforge.net/lists/listinfo/simple-support > > > > > -- > Quirino Zagarese > > LaszloItalia Founder (www.laszloitalia.org <http://www.laszloitalia.org>) > Software Development Manager - Galilaeus s.r.l. CONFIDENTIAL This document and attachments contain information from Fusion-io, Inc. which is confidential and/or legally privileged. The information is intended only for the use of the individual or entity named on this transmission. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the contents of this emailed information is strictly prohibited, and that the documents should be returned to Fusion-io, Inc. immediately. In this regard, if you have received this email in error, please notify us by return email immediately. |