Re: [xml] reuse (aka "dict")

On Sun, Jul 20, 2008 at 10:04:04AM +0300, Eli Marmor wrote:
My first hour on this list, so please forgive me if the question is
silly (I haven't lurked... ;-)

I guess that thanks to dict, things run MUCH faster (less memory, less
string comparisons since many comparisons end with "==" of addresses,

Unfortunately, when I'm trying to print addresses of node->name (with
equal names), I receive different addresses.

I printed doc->dict, and it's NULL.

I replaced the htmlReadMemory() by htmlCtxtReadMemory(), and finally I
see a dict (in ctxt->dict), but in the wrong place (doc->dict is still
NULL), and addresses of the same names are still different.

Under SAX the addresses (of equal strings) are equal (i.e. dict is

  I'm not sure the HTML parser really switched fully to dict, it should
I think but maybe this is not enabled. Usually people find the HTML parsing
speed and sdpace requirement fine.

How can I enable the "dict" feature in DOM too?

  Not sure that this means, the problem is that if the document has no
dictionary, then the SAX2 building callbacks won't try to reuse it


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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