On Wed, Jan 26, 2005 at 11:35:52AM +0100, Martijn Faassen wrote: > >One note though, I'm using dictionnaries more and more intensively those > >days, so keeping a single dictionnary for everything, while it clearly > >speed-up processing may grow quite a bit for example as you process random > >documents. It might be a good idea to "sometimes" reset the dictionnary > >to avoid explosion, for example for all the ID strings ever processed > >by the program. > > I don't use a single dictionary to speed up processing. I am using a > single dictionary as I have absolutely no way to know which nodes from > which nodes are going to be combined. I actually don't know what these > dictionaries are used for (are elements stored in them? text node > strings? both? and why? :), but having separate ones is just an > impediment to moving nodes around freely. Moving nodes around freely is > absolutely essential in my library's case, as the API I'm implementing > allows this always.
okay then just keep the same dictionnary, but it may grow indefinitely and may slow things down after a while. > What do you mean by resetting for every ID string? You mean as soon as > an ID is encountered in an XML document? This may never happen for many > classes of XML document, right? IDs values are stored in the dictionnary, they are potentially random strings, and hence may grow your dictionnary indefinitely even if the documents you manipulate have a fixed vocabulary. If it doesn't make sense for you, just forget about it. Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
