DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15503>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15503 RefHashTableOf has poor performance due to constant table size Summary: RefHashTableOf has poor performance due to constant table size Product: Xerces-C++ Version: Nightly build (please specify the date) Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Utilities AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] We need to attach user data to nearly every node in a Xerces DOM in our application. In doing so, I started to notice bad performance in SetUserData/GetUserData. User data for every node is stored in a RefHashTableOf on the Document that is initialized to size 29. RefHashTableOf, however, does not ever increase the size of its table when the number of element gets big. In our case, with a relatively average 30,000 node document, the best case (i.e. even distribution in the hashtable) is that every GetUserData call traverses a 1,000-element linked list. This is rather slow. :) The solution is for RefHashTable to maintain a load factor by increasing table size when needed. I have attached a patch to accomplish exactly that. The results: in our application, we now spend less than 20% as much time doing GetUserData/SetUserData as we used to, and a nice overall performance win. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]