Review: Needs Information

It seems to me that the change you are proposing is adding a lot of overhead. 
Especially for the simple store, a ulong with simple arithmetic operations has 
been replaced with a class containing several virtual functions.

I propose the following alternative solution which we should consider:

- make the SimpleStore and XmlNode template classes
- introduce typedefs to keep the textual changes minimal
- the template parameters are the TreeId that should be used and a traits class 
providing the required operations for the TreeId
- in the simplestore,
  - the type of the TreeId would be ulong
  - the traits class would implement the basic operations very efficiently 
(e.g. + operator or < with ulongs)
- in some other store,
  - the type of the TreeId could be a uuid
  - the traits class would implement the operations on top of uuids

This way, the simplestore's code that is actually executed (i.e. there is no 
runtime overhead). Also, once this extension mechanism is in place, other 
dynamic extensions (e.g. factories) could be replaced also in order to avoid 
even more runtime overhead.

-- 
https://code.launchpad.net/~zorba-coders/zorba/treeidapi/+merge/93591
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to