Re: [xml] Hashing strings

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Tue Feb 22 2000 - 09:29:04 EST


On Tue, Feb 22, 2000 at 02:39:14PM +0100, Peter Jacobi wrote:
>
> Daniel, all,
>
> Sorry if this outright silly or was discussed long ago:

  Not silly at all. I remember people asking about this.

> Wouldn't it be a siginificant optimization to hol element and
> attribute names in a hashtable and only store hashes in the nodes?

  Well, this may or may not be a significant gain depending
on your documents. If your information is mostly encoded in
the structure, yes this may be significant. On the other hand
for more document oriented XML files you won't gain much.
  One of the gain is at execution time, basically xmlStrcmp()
could immediately return because both pointers are the same.

  I'm currently focusing on correctness, but if this change
should be done this is something to do before releasing 2.0
(since it is likely to pose binary compatibility problems).

  What do other think ? Figures of the expected memory gain
would be welcome.

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe
----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:04 EDT