Re: [Simple-support] Android performance - strange profiling
Brought to you by:
niallg
|
From: bubbleguuum <bub...@fr...> - 2012-01-10 16:20:27
|
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. |