[Tails-dev] Please review bugfix/fix_slow_offline_documentat…

Üzenet törlése

Válasz az üzenetre
Szerző: Ague Mill
Dátum:  
Címzett: tails-dev
Tárgy: [Tails-dev] Please review bugfix/fix_slow_offline_documentation
Hi!

It looks like I have a fix for the slow operation of Yelp while browsing
our offline documentation:
<https://tails.boum.org/todo/faster_offline_documentation_browsing/>

For the record, here is how I tracked down the issue: I felt something
was wrong with the specifics of our documentation, as Yelp was working
fine on other documents in Tails. So I've tried with an empty
`local.css`. And then it was fast. This lead me to do a binary search
(removing half, then half of half, etc.) to find which parts of the CSS
were making the whole thing slow.

7 iterations later, I found the culprit: '*box-shadow' properties.
Removing them was enough to make Yelp fast again. This makes the look a
little bit flat, but it does not make the website ugly.

Therefore the fix in `bugfix/fix_slow_offline_documentation` is trivial:

--- /dev/null
+++ b/config/chroot_local-hooks/18-fix_offline_website_css_for_yelp
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+# Yelp becomes awfully slow when 'box-shadow' properties are used.
+# So let's just remove the bling-bling to get a better offline browsing
+# experience.
+
+sed -e '/box-shadow/d' -i /usr/share/doc/tails/website/local.css

(Unfortunately, I have discovered in the process that Yelp crashed when
clicking an inline link. This is totally unrelated. New bug page
added.)

Again, candidate for 0.13~rc2.

--
Ague