Re: [xml-bindings] xmlCore (was: Let's start)



>   Well of course API wise changing this is not possible. But there is another
> aspect that is very important: memory allocation ! Basically under such
> a design allocating the node requires to allocate 2 blocks, and deallocation
> also requires to free 2 blocks instead of one in the current design. Of course
> this point should be balanced with the other allocations needed like the
> node name, content, etc. but currently when profiling the parser and
> bulding a tree, the allocations function are the ones taking the most time
> (and Linux memory allocator tends to be fast compared to other
implementations).

sorry... I used the word "referrenced" but meant it another way; the xmlCore (or
whatever name) would be the first member struct, so that no extra allocation was
necessary. Some sort of pretended inheritance.

Anyway, all sources depending on libxml2 would be affected, so I guess this will
be possible no sooner than in libxml3 (if accepted at all)... perhaps some
intermediate steps involing union magic could make it easier in the future.

Regards
Petr






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]