summaryrefslogtreecommitdiff
path: root/man/feh.pre
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-11-30 19:21:43 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-11-30 19:27:15 +0100
commit2d37cd91c6718316188e7fd99088cda0e627db74 (patch)
tree756102b8ac6f56dbf6281a03ead023205fd0bef9 /man/feh.pre
parent2e4fc9018d5776bd63d48c2b4824ef04b3235ebc (diff)
Check magic bytes before passing a file to Imlib2's loader
This works around a regression in Imlib2, which makes (un)loadable file detection quite slow when handling e.g. large video files. See <https://phab.enlightenment.org/T8739> and <https://github.com/derf/feh/issues/505> for details. Closes #505
Diffstat (limited to 'man/feh.pre')
-rw-r--r--man/feh.pre17
1 files changed, 17 insertions, 0 deletions
diff --git a/man/feh.pre b/man/feh.pre
index d44f600..6dfa9e7 100644
--- a/man/feh.pre
+++ b/man/feh.pre
@@ -162,6 +162,23 @@ Use
.Cm --conversion-timeout Ar timeout
with a non-negative value to enable support for these formats.
.
+.Pp
+.
+As Imlib2 may take several seconds to determine whether it can load a file or
+not
+.Pq e.g. when attempting to open a large video ,
+.Nm
+checks each file's header before loading it.
+If it looks like an image, it is passed on to Imlib2, otherwise, it is
+assumed to be unloadable.
+This greatly improves performance when working in directories with mixed files
+.Pq i.e., directories which do not exclusively contain image files .
+If you think that Imlib2 can load a file which
+.Nm
+has determined to be likely not an image, set the environment variable
+.Qq FEH_SKIP_MAGIC
+to pass all files directly to Imlib2, bypassing the header check.
+The environment variable's value does not matter, it just needs to be set.
.
.Sh OPTIONS
.