Compressed tutorials

Bug #171531 reported by Xaviconde-users on 2006-09-30
6
Affects Status Importance Assigned to Milestone
Inkscape
Wishlist
jazzynico
Inkscape-docs
Wishlist
jazzynico

Bug Description

Hi all,

i've noted that Inkscape's tutorial folder is very big.
Currently, it's 15 MB and there are not so much
translated languages. I think a useful optimization
would be compressing the tutorials and distributing
them on .svgz format.

I suppose this involves:

* Compressing the tutorials on build time. Tutorials
should remain plain SVG anyway since they are on the
SVN repository, but they could be compressed on build time.

* Changing the mechanism for loading tutorials, and
make it search for compressed tutorial (.svgz) first,
and uncompressed tutorial if not found.

Regards.

Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
su_v (suv-lp) on 2009-09-22
tags: added: tutorials
removed: build-compile-code-design
jazzynico (jazzynico) wrote :

Nice idea!
We could also use scour in order to optimize it first (but it seems that scour doesn't handle the tutorials very well at the moment). Probably too late for 0.47, but I add it on my 0.48 todos.

Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
milestone: none → 0.47.1
jazzynico (jazzynico) wrote :

Some tests with scour (with --keep-editor-data) and compression on share/tutorials.

Inkscape SVG: 35Mio
Optimized SVG (scour): 24Mio
Inkscape SVGZ: 9Mio
Optimized SVGZ: 6Mio

So we could save up to 29Mio of disk space and 3Mio of (compressed) package size!

jazzynico (jazzynico) wrote :

See also Bug #238276 (Big translation files for lots of languages are distributed in inkscape deb package instead of language-packs)

Changed in inkscape:
milestone: 0.47.1 → 0.48
status: Confirmed → In Progress
jazzynico (jazzynico) wrote :

First step done. Tutorials are now optimized with scour.

su_v (suv-lp) wrote :

Missing in r9016: white backgroup logo 'INKSCAPE' (clone id="use1328", references existing xlink:href="#path1508") in the footer at the bottom of the tutorial.

tested with Inkscape 0.47+devel osx for 'tutorial-basic.svg' r9016, r8685, r8625, r7914, r6705: the clone is visible in all revisions before 9016.

jazzynico (jazzynico) wrote :

Nice one, ~suv! Thanks!

The missing background is not due to Inkscape or to the recent changes in the tutorial XSLT, but probably caused by a bug in scour (I can reproduce it with the "old" 0.47 tutorials after running scour too).
I try to fix it before the end of the week.

BTW, I still hesitate to compress the tutorials. The package size is already reduced by about 30% with scour, and compressing it only reduce the size on disk. The drawback being that svgz can't be opened with a text editor, and thus harder to debug...
It's probably worth a post in the dev list.

jazzynico (jazzynico) wrote :

Correction: scour is not faulty at all.

Scour just removes an unnecessary fill-opacity: 1; attribute in a path element.
But when this path is linked in a use element later, this removal causes Inkscape to multiply an opacity element and a fill-opacity element, and thus apply an almost zero value. In the original (non scoured) tutorial, the use element seems to inherit the fill-opacity attribute (1) from the path element, and thus the overall opacity is equal to the opacity attribute only.

Non scoured path element:
<path style="fill:#ffffff;fill-opacity:1; ....... id="path1508" />

Soured path element:
<path style="fill:#ffffff; ........ id="path1508" />

use element:
<use style="opacity:0.084269650;color:#000000;fill:#ffffff;fill-opacity:0.064615376; ...... xlink:href="#path1508" />

Possible workarounds:
1. Set the path's fill-opacity element to 0.9999 (a bit dirty, isn't it?) so that it is not removed by scour.
2. Remove the opacity attribute in the use element.

I think I'll use workaround #2.

jazzynico (jazzynico) wrote :

Half done. The tutorial are now optimized with scour. I'll try to compress it in 0.49 (it needs some work in the code...).

Changed in inkscape:
milestone: 0.48 → 0.49
jazzynico (jazzynico) on 2011-02-07
Changed in inkscape-docs:
assignee: nobody → JazzyNico (jazzynico)
importance: Undecided → Wishlist
status: New → In Progress
jazzynico (jazzynico) on 2012-10-21
Changed in inkscape:
milestone: 0.49 → none
Patrick Storz (ede123) wrote :

Considering hard disk space is not so much of an issue these days I tend to skip the remaining part (compress and ship as .svgz) and consider this fixed.

I'm particularly concerned about the fact, that the gzip compression applied to the tutorials might make compression of the distribution archive itself less efficient, so we'd trade disk space (cheap and no concern for most users) for download time (which might annoy users).

grey tomorrow (gtomorrow) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at
https://inkscape.org/report .

Moved to: https://gitlab.com/inkscape/inbox/issues/3708
Closed by: https://gitlab.com/greytomorrow

tags: added: bug-migration
Changed in inkscape:
status: In Progress → Invalid
Changed in inkscape-docs:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.