shrinking templates / bloat ...

Jesso Murugan developer.jesso at gmail.com
Thu Jun 28 05:26:07 PDT 2012


Hi Michael,

I am sorry I didn't cc libreoffice list in the previous email. I think
having this on the public list might be of use to other new people similar
to
me. (I have no issues discussing this privately, I'm afraid I am not yet
sure of the culture here.)

On Tue, Jun 26, 2012 at 1:48 PM, Michael Meeks <michael.meeks at suse.com>
wrote:
>       I guess for de-bloating; we want to first poke at the 'ott' files in
> extras/:
>
>       du -m | sort
>
>       in there shows:
>
> 41      ./source/templates/wizard
> 53      ./source/templates
>
>       Which I guess shows a good place to start: the wizards are big
bloated
>users of templates. The wizards/ code is in wizards/ :-)

Yes I checked, a lot of savings can be made here.

>       It would be great to see if we can adapt that to use a flat ODF file
> instead - try saving the template as a .fott (if that works, or .fodt if
> not), and add some goodness to to the flat ODF filter ( initially to
> prototype it, just hack some translation support directly into the code
> I suggest in filter/source/odfflatxml/ ).

I saved one template (for two different languages) as .fodt and did a diff.
As
expected only a handful were changing.

>       We really want to compress all the pointless language differences in
> those templates out into just a few translated strings / attributes that
> we can annotate and replace on load.

If I understood you correctly, the plan is to use one base fodt with
placeholders
for the attributes and values which change, and then substitute the
appropriate
values when the template is loaded. So those strings alone should be hard
coded
or kept in another file.

> That will (I hope) give us more space for translations & dictionaries
> and/or a smaller download & install :-)


The .fodt file had a size around 153 kb, and the individual .ott files were
around 23 kb (for the template I chose), so 23 kb * 23 languages = 529 kb,
so we cut around 71% :-)

> Does that make sense ?

Did I understand you correctly?

I'll now see what I can do in filter/source/odfflatxml/

Thanks and regards.

- Jesso Clarence
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120628/29a373d7/attachment.html>


More information about the LibreOffice mailing list