|
Subject: osync_xmlformat_validate() in format plugins Newsgroups: gmane.comp.misc.opensync.devel Date: 2008-05-03 15:16:45 GMT (1 year, 8 weeks, 6 days, 22 hours and 11 minutes ago) Hi, i just found that osync_xmlformat_validate() is quite expensive, since it parses for each call the XSLT schemas from scratch (xmlSchemaParse()). Callgraph of sync with vformat plugin and the vcard_to_xmlformat converter: http://cryptomilch.de/~dgollub/OpenSync/opensync_profiling_xmlformat_validate.png (Look for the redline in on the left bottom of the callgraph - 991x stands for the 991 function calls.) Actually we could do this XSLT schema parsing within in the OpenSync framework once, and validate all xmlformats which got reproted with the same object from a single xmlSchemaParse() call. This would require some changes for osync_xmlformat_*() - i try to prepare a patch within the next days. This would save us 990 of 991 xmlSchemaParse() calls in mentioned example. One call for each used xmlformat. If someone would sync contacts and events this would end up in two xmlSchemParse() calls for xmlformat-event and xmlformat-contact.... Anyway- for now i would recommend to remove osync_xmlformat_validate() calls from every format plugin converter function. It's O.K. for debugging tools like "vconvert", but the plugin format conversion routines should be fast ;) I already removed osync_xmlformat_validate() from the vformat plugin and from gnokii-format and palm-format plugins. AFAIK there is only opie-sync and sync4j-sync (is anyone still using this?) left which have osync_xmlformat_validate(), at least in the OpenSync SVN - didn't checked yet other format plugins. best regards, Daniel ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone |
|
|