On Mon, Feb 28, 2011 at 11:20 AM, Lucas De Marchi <[email protected]> wrote: > Hi Gustavo, > > On Mon, Feb 28, 2011 at 10:20 AM, Gustavo Sverzut Barbieri > <[email protected]> wrote: >> I've worked with expat before and it's way more complex to use and >> heavy. Sure, it will work and will handle namespace, and encoding... >> but many times you don't want or need it. >> >> the current SAX-like api I'm calling is 1 single function that >> receives a buffer and a callback, calls you back with pointers to the >> buffer you handled it. It does not consider any form of encoding, thus >> it will never break, it's up to you. It will fallback nicely on >> unhandled conditions, like entity definitions are not handled, they >> are given to you as an open tag statement. That is because MOST of >> these files are ascii and do not use these xml nasty features such as >> entities & like. > > I agree with you this is a good thing to have in eina... particularly > because efreet could be based on top of this. However, I think it'd be > good if you could provide some benchmarks with libxml2 vs expat vs > eina.
I'll not write such benchmarks, no time and if I have spare I'd do the ini and json parsers as said at IRC. either you trust me, or you review my code... but I doubt there is any way to be faster than that... only if I fallback to optimized string pattern code, like checking for alignment and check if the pattern is there even if it would overflow the string, if found then fallback to regular matching. Another optimization would be to keep the first/last position of whitespace to avoid things like whitespace_unskip... but really, neither libxml2 or expat will do those, and they allocate memory that by itself will be slower (may go to system brk() and needs memcpy() later). BR, -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
