Re: [Simple-support] Android performance - strange profiling
Brought to you by:
niallg
|
From: Dawid W. <daw...@gm...> - 2012-01-10 17:15:44
|
Thanks for clarification, bubbleguuum. Is there a way to build it in advance or not build the schema then? We have one-time configuration loading code so any caching is not going to make any difference. I also experimented with pull parser replacement and it did provide some speedup, but it was a fraction of the total first-parse initialization cost under .NET. Dawid On Tue, Jan 10, 2012 at 5:20 PM, bubbleguuum <bub...@fr...> wrote: > On 10/01/2012 17:11, Dawid Weiss wrote: >> >> This is not only the case with Android I think. We compile simple-xml >> to .NET via IKVM and the startup time lag is significant too. I think >> it's the sheer amount of classes involved is the problem (initial >> JITting). >> >> I would appreciate if you could share your findings and I would be >> interested in helping to improve it if possible. >> >> Dawid >> > > First parsing is slow as a model of the schema is constructed (and cached). > Subsequent parse should be much faster. > > However I have recently converted a simple-xml parser to straight > XmlPullParser and it was 3-5x faster. > Notably, direct XmlPullParser allocates way less temp objects which in turn > lessen garbage collection a lot. > > At this point, I wouldn't use simple-xml on Android when parsing performance > is important or critical. > |