To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=88162
                 Issue #|88162
                 Summary|Removing blank lines from a .xcu file to reduce its si
                        |ze
               Component|utilities
                 Version|OOo 2.4.0
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|hro
             Reported by|tora





------- Additional comments from [EMAIL PROTECTED] Fri Apr 11 06:36:00 +0000 
2008 -------
Phenomenon:
.xcu files in the directory /opt/openoffice.org2.4/share/registry/res/ 
include much blank lines. That might affect performance.

Facts:
For instance, res/ja/org/openoffice/Office/DataAccess.xcu has 3247 lines.
128 lines out of them have a content and the rest has a blank line. 
The rate, 128 divided by 3247, is 3.94%. 

Total amount of .xcu files in the directory res/ja reaches 312221 lines 
and 2875301 bytes (approx. 2.7MB). If the blank lines are removed, the 
total could be reduced to 18846 lines and 747025 bytes (approx. 0.7MB).

An attachemnt file lines.txt shows the statictics of OOo 2.4 Linux 
English plus a Japanese language pack. Each line has four columns: 
rate, the number of meaningful lines, the number of total lines, and 
file name. A part of the file is shown below.

Rate    Lines   Lines   Filename
======= ======= ======= ===========================================
03.94%  128     3247    res/ja/org/openoffice/Office/DataAccess.xcu
05.01%  4342    86650   res/ja/org/openoffice/Office/TableWizard.xcu
...(omitted)...
100.00% 8668    8668    data/org/openoffice/Office/TableWizard.xcu
100.00% 14113   14113   data/org/openoffice/Office/Labels.xcu

The above file can be produced with the following commands:
cd /opt/openoffice.org2.4/share/registry
f=`find * -name '*.xcu'`
perl -ne '$n++ unless m/\A\s*\Z/; if (eof) { $r=$n*100.0/$.; printf
"%05.2f%%\t%d\t%d\t%s\n", $r, $n, $., $ARGV; $n=0; close ARGV }' $f | sort -n -k
1 -n -k 3 > lines.txt

Proposal:
To remove blank lines, a XSLT stylesheet officecfg/util/alllang.xsl 
could be slightly tweaked by adding the following line in the beggining.

  <xsl:strip-space elements="*" />

---------------------------------------------------------------------
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]

Reply via email to