[fpc-devel] Want to remove AVL_Tree from DOM
Sergei Gorelkin
sergei_gorelkin at mail.ru
Sat Oct 24 23:22:04 CEST 2009
Marco van de Voort wrote:
> short summary:
> - need the current interface very badly to be backwards compat, if I (and
> Lazarus) are ever migrating to a FCL one. Changes to the interface
> not really an option, then I'd stick to my ancient lazarus version forever.
The xmlconf has the same interface as xmlcfg, except string parameter types are
WideString not AnsiString (this is handled transparently by the compiler), and
OpenKey/CloseKey/ResetKey are added. So using xmlconf won't require any changes.
The Lazarus version of TXMLConfig, however, is not a TComponent descendant and
has a different constructor, therefore replacing it with FCL version would require
heavy patching - but that's a different and unrelated issue.
> - I'm talking about the lazarus version atm, afaik that one has been
> optimized in the past because the FCL version was slow.
It's no longer that slow. I had put much effort in getting it as fast as possible.
The current timings of reading the same 1 MByte XML file are
(on a Core2Duo E7200, Windows - with non-refcounted WideStrings):
laz_xmlread: 60 ms,
xmlread + avl_tree: 80 ms,
xmlread w/o avl_tree: 40 ms, note that 2 times difference!.
Comparing the XMLConfig performance is a bit harder, because it depends on the structure
of the configuration data - but at least the parsing time is always a part of loading the
config data.
> - Don't like openkey/closekey much. On the other hand, my XML config
> loading/saving is not that much performance dependant, so if it remains
> working without openkey/closekey, and it is not too bad, it is fine. (I
> must be able to load/store a 10-40kb file in sub 50ms, but that should be
> doable).
Since the numbers above are for 1 MByte file, it indeed should be doable.
Ok then, I think I should document this change at the User Changes Trunk wiki page and
go ahead.
Regards,
Sergei
More information about the fpc-devel
mailing list