standardebooks / lewis-carroll_through-the-looking-glass_john-tenniel

Epub source for the Standard Ebooks edition of Through the Looking-Glass, by Lewis Carroll. Illustrated by John Tenniel
https://standardebooks.org/ebooks/lewis-carroll/through-the-looking-glass/john-tenniel
Other
2 stars 8 forks source link

very slow to render #10

Closed keturn closed 3 weeks ago

keturn commented 6 months ago

It is very slow to open chapters and pages of this (kepub) on my Kobo Clara HD. Long enough that I thought it had completely frozen the device at first. Given that loading https://github.com/standardebooks/lewis-carroll_through-the-looking-glass_john-tenniel/blob/master/src/epub/images/illustration-2.svg severely lags my chromebook for at least a good five seconds or so, I think it's pretty safe to blame the large SVGs.

How were they vectorized? Is there a way to slim them down?

acabal commented 6 months ago

Yes, the SVGs are quite large. Open to suggestions on ways to slim them down.

keturn commented 6 months ago

I've turned up a couple packages that might be relevant:

But I think that before we go trying to wrangle these generated svg files to something manageable, it could be worth re-examining how they were generated in the first place. Are there parameters on that end for adjusting the number or complexity of the paths it spits out?

acabal commented 6 months ago

They were generated a long time ago and I don't remember how. Probably using trace path in Inkscape. I don't think how they were generated matters that much, if some tool can compress them without much or any fidelity loss, or if someone can recreate them in some better way.

acabal commented 3 weeks ago

Closed due to inactivity.