To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=86772 Issue #|86772 Summary|svtools string constant sharing Component|utilities Version|OOH680m8 Platform|All URL| OS/Version|Linux Status|NEW Status whiteboard| Keywords| Resolution| Issue type|PATCH Priority|P3 Subcomponent|code Assigned to|cd Reported by|kendy
------- Additional comments from [EMAIL PROTECTED] Thu Mar 6 15:14:03 +0000 2008 ------- I'm going to attach a patch that reduces the number of relocations on startup based on Michael's blog entry: http://www.gnome.org/~michael/activity.html#2008-01-24 ----- 8< ------ ... find 2400 relocations on startup (4%) are to please a cunning 31337 'memory-saving' strategy: the thinking goes like this: - Instead of having lots of small strings in-line in several libraries, lets have a single copy of each string in a common library (svtools). [ so far, so clever ]. - Lets implement that using a symbol per string eg. extern SVT_DLLPUBLIC sal_Char const SVTOOLS_CONSTASCII_DECL( sHTML_S_aacute, "aacute" ); [ oh dear ! - this of course generates a nice const char * rodata string - but it also generates another string in the svtools symbol table: "sHTML_S_aacute", plus another string in -each- shared library that refers to it ]. So - comparing to the approach of using a simple in-line string (also uniquified by any decent compiler & put in rodata), we loose size: ( sizeof "sHTML_S_" + sizeof (relocation) ) * ( num-references + 1 ) and we loose performance: 2400 unique named relocations, searched across 50+ shared libraries: ~0.8% of OO.o CPU time on startup. And all in the name of efficiency. Unfortunately, the technique dates back to the dawn of time, (in cvs history terms), so it's hard to discern the intention. I wonder where else it's used. ----- 8< ----- --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]