diff options
Diffstat (limited to 'doc/users')
-rw-r--r-- | doc/users/GiuseppeBilotta.mdwn | 6 | ||||
-rw-r--r-- | doc/users/LucaCapello.mdwn | 5 | ||||
-rw-r--r-- | doc/users/Olea.mdwn | 4 | ||||
-rw-r--r-- | doc/users/OscarMorante.mdwn | 3 | ||||
-rw-r--r-- | doc/users/RickOwens.mdwn | 1 | ||||
-rw-r--r-- | doc/users/adamshand.mdwn | 10 | ||||
-rw-r--r-- | doc/users/anarcat.mdwn | 30 | ||||
-rw-r--r-- | doc/users/hb/discussion.mdwn | 1 | ||||
-rw-r--r-- | doc/users/joshtriplett/discussion.mdwn | 2 | ||||
-rw-r--r-- | doc/users/mathdesc.mdwn | 190 | ||||
-rw-r--r-- | doc/users/pdurbin.mdwn | 1 | ||||
-rw-r--r-- | doc/users/tbm.mdwn | 3 | ||||
-rw-r--r-- | doc/users/undx.mdwn | 7 | ||||
-rw-r--r-- | doc/users/wiebel.mdwn | 5 |
14 files changed, 259 insertions, 9 deletions
diff --git a/doc/users/GiuseppeBilotta.mdwn b/doc/users/GiuseppeBilotta.mdwn new file mode 100644 index 000000000..7b15da959 --- /dev/null +++ b/doc/users/GiuseppeBilotta.mdwn @@ -0,0 +1,6 @@ +Custom patches to IkiWiki can be found in select branches of +<http://git.oblomov.eu>. + +Patches proposed/discussed: +[[!map pages="link(users/GiuseppeBilotta) and (todo/* or bugs/*) and +link(branches) and !link(todo/done)"]] diff --git a/doc/users/LucaCapello.mdwn b/doc/users/LucaCapello.mdwn new file mode 100644 index 000000000..5ddccbf3d --- /dev/null +++ b/doc/users/LucaCapello.mdwn @@ -0,0 +1,5 @@ +[Debian Developer](http://wiki.debian.org/LucaCapello) + +[homepage](http://luca.pca.it) + +[write me](mailto:luca@pca.it) diff --git a/doc/users/Olea.mdwn b/doc/users/Olea.mdwn new file mode 100644 index 000000000..1db2a7cf5 --- /dev/null +++ b/doc/users/Olea.mdwn @@ -0,0 +1,4 @@ +[[!meta title="Ismael Olea"]] + +Ismael Olea is <a href="mailto:ismael@olea.org">ismael@olea.org</a>. +His web page is [here](http://olea.org/diario/). diff --git a/doc/users/OscarMorante.mdwn b/doc/users/OscarMorante.mdwn new file mode 100644 index 000000000..7ece36db0 --- /dev/null +++ b/doc/users/OscarMorante.mdwn @@ -0,0 +1,3 @@ +Oscar Morante <oscar@morante.eu> + +[homepage](http://oscar.morante.eu) diff --git a/doc/users/RickOwens.mdwn b/doc/users/RickOwens.mdwn new file mode 100644 index 000000000..c619569d8 --- /dev/null +++ b/doc/users/RickOwens.mdwn @@ -0,0 +1 @@ +I'm a Systems Analyst in Montana. I use ikiwiki as a private notebook/journal/worklog/etc. diff --git a/doc/users/adamshand.mdwn b/doc/users/adamshand.mdwn index 5273c6439..acb2290ca 100644 --- a/doc/users/adamshand.mdwn +++ b/doc/users/adamshand.mdwn @@ -2,14 +2,6 @@ New ikiwiki user (well not really "new" anymore), long time wiki user. :-) -<http://adam.shand.net/iki/> +<http://adam.shand.net/> [[!map pages="link(AdamShand)"]] - -<!-- for map bug -## Correct? (No extra ULs) -\[[!map pages="setup*" show="title"]] - -## Bug? (Extra UL for each LI) -\[[!map pages="tagged(done) and tagged(patch)" show="title"]] ---> diff --git a/doc/users/anarcat.mdwn b/doc/users/anarcat.mdwn index d868d7493..2bd50c76b 100644 --- a/doc/users/anarcat.mdwn +++ b/doc/users/anarcat.mdwn @@ -1 +1,31 @@ See <https://wiki.koumbit.net/TheAnarcat> + +[[!toc]] + +My todos +======== + +... or the ones I commented it, to be more precise. + +[[!inline pages="todo/* and !todo/done and !link(todo/done) and +link(users/anarcat) and !todo/*/*" sort=mtime feeds=no actions=yes archive=yes show=0]] + +Done +---- + +[[!inline pages="todo/* and !todo/done and link(todo/done) and +link(users/anarcat) and !todo/*/*" feeds=no actions=yes archive=yes show=0]] + +My bugs +======= + +... same. + +[[!inline pages="bugs/* and !bugs/done and !link(bugs/done) and +link(users/anarcat) and !bugs/*/*" sort=mtime feeds=no actions=yes archive=yes show=0]] + +Fixed +----- + +[[!inline pages="bugs/* and !bugs/done and link(bugs/done) and +link(users/anarcat) and !bugs/*/*" feeds=no actions=yes archive=yes show=0]] diff --git a/doc/users/hb/discussion.mdwn b/doc/users/hb/discussion.mdwn index 15c065e45..3214e1521 100644 --- a/doc/users/hb/discussion.mdwn +++ b/doc/users/hb/discussion.mdwn @@ -3,3 +3,4 @@ consider documenting them? Perhaps we could turn the result into a [[tip|tips]]. -[[JoshTriplett]] > Well, certainly. Basically it's just inline + tag feature. I'm going to have more time in May for ikiwiki, I hope. > > Any news about that ? +> > > I am also interested if you do not mind to share with us. [[cstamas]] diff --git a/doc/users/joshtriplett/discussion.mdwn b/doc/users/joshtriplett/discussion.mdwn index 16e9be057..bbe0ed7c1 100644 --- a/doc/users/joshtriplett/discussion.mdwn +++ b/doc/users/joshtriplett/discussion.mdwn @@ -64,3 +64,5 @@ The other thing I saw was: Moin version is 1.8.5 Help please! + +> Please take a look at [[tips/Convert_moinmoin_to_ikiwiki]] again, the code has radically changed and should now be easier to use *and* work with 1.8.x. --[[anarcat]] diff --git a/doc/users/mathdesc.mdwn b/doc/users/mathdesc.mdwn new file mode 100644 index 000000000..acb2a0756 --- /dev/null +++ b/doc/users/mathdesc.mdwn @@ -0,0 +1,190 @@ +mathdesc-at-scourge.biz +. +## PROFILING slow render : Case buggy [[plugins/filecheck]] ? + +Saving an article from ikiwiki editor is long ? +<tt>ikiwiki --setup wiki.setup --rebuild</tt> is long ? + +Of course it depends the size of the wiki but if it's tiny and still take +more that two minutes, it's boring. But if it takes a **dozen of minutes**, it's plain buggy. + +Actually one can with a verbose rebuild narrow down which page "lags" : + +<code> + private/admin.mdmn + tag/admin + tag/private +</code> + +It's also possible to measure render time on one of these pages like this: + +<code> +time ikiwiki --setup wiki.setup --render private/admin.mdwn +</code> + +Well indeed for such a simple page, something fishy is going on. + +Still for simple yet superficial but enough profiling test, it requires +a sub-level perl profiler. + +## Using SmallProf + +[[tips/optimising_ikiwiki/#index10h2]] proposed [[!cpan Devel::NYTProf]]. + +Try it hard to make it spits realistic numbers or even a trend to point +the bottleneck in the code. Bref -- nothing valuable nor coherent, it's way to sophisticated to be handy +in my situation (virtual machine, SMP system, long runs, clock drifts, etc...) + +[[!cpan Devel::SmallProf]] is simple and just works(c) + +<pre> +export PERL5OPT=-d:SmallProf +time ikiwiki --setup wiki.setup --rebuild +sort -k 2nr,2 -k 3nr,3 smallprof.out | head -n 6 +</pre> + + +### Results : 6 top slowpits + +Total rebuild time:<br/> +real 5m16.283s<br/> +user 2m38.935s<br/> +sys 2m32.704s<br/> + + +Total rebuild time (under profiling) : <br/> +real 19m21.633s<br/> +user 14m47.831s<br/> +sys 4m11.046s<br/> + + +<pre> +[num] [walltime] [cputime] [line]: [code] +3055 114.17165 15.34000 149: $mimetype=<$file_h>; +1626527 69.39272 101.4700 93: read($fh, $line, $$ref[1]); # read max +3055 50.62106 34.78000 148: open(my $file_h, "-|", "file", "-bi", +1626527 14.86525 48.50000 92: seek($fh, $$ref[0], SEEK_SET); # seek +1626527 13.95613 44.78000 102: return undef unless $line =~ $$ref[3]; # +3055 5.75528 5.81000 76: for my $type (map @$_, @rules) { +</pre> + +legend : +*num* is the number of times that the line was executed, *time* is the amount of "wall time" (time according the the clock on the wall vs. cpu time) +spent executing it, *ctime* is the amount of cpu time expended on it and *line* and *code* are the line number and the actual text of the executed line +(read from the file). + + +3 topmost issues are located in this file : + +<tt>/usr/lib/perl5/vendor_perl/5.12.3/IkiWiki/Plugin/filecheck.pm</tt> +<pre> +sub match_mimetype ($$;@) { + my $page=shift; + my $wanted=shift; + + my %params=@_; + my $file=exists $params{file} ? $params{file} : IkiWiki::srcfile($IkiWiki::pagesources{$page}); + if (! defined $file) { + return IkiWiki::ErrorReason->new("file does not exist"); + } + + # Get the mime type. + # + # First, try File::Mimeinfo. This is fast, but doesn't recognise + # all files. + eval q{use File::MimeInfo::Magic}; + my $mimeinfo_ok=! $@; + my $mimetype; + if ($mimeinfo_ok) { + my $mimetype=File::MimeInfo::Magic::magic($file); + } + + # Fall back to using file, which has a more complete + # magic database. + if (! defined $mimetype) { + open(my $file_h, "-|", "file", "-bi", $file); + $mimetype=<$file_h>; + chomp $mimetype; + close $file_h; + } + if (! defined $mimetype || $mimetype !~s /;.*//) { + # Fall back to default value. + $mimetype=File::MimeInfo::Magic::default($file) + if $mimeinfo_ok; + if (! defined $mimetype) { + $mimetype="unknown"; + } + } + + my $regexp=IkiWiki::glob2re($wanted); + if ($mimetype!~$regexp) { + return IkiWiki::FailReason->new("file MIME type is $mimetype, not $wanted"); + } + else { + return IkiWiki::SuccessReason->new("file MIME type is $mimetype"); + } +} +</pre> + +Next 3 in this file : + +<tt>/usr/lib/perl5/vendor_perl/5.12.3/File/MimeInfo/Magic.pm</tt> +<pre> +sub _check_rule { + my ($ref, $fh, $lev) = @_; + my $line; + + # Read + if (ref $fh eq 'GLOB') { + seek($fh, $$ref[0], SEEK_SET); # seek offset + read($fh, $line, $$ref[1]); # read max length + } + else { # allowing for IO::Something + $fh->seek($$ref[0], SEEK_SET); # seek offset + $fh->read($line, $$ref[1]); # read max length + } + + # Match regex + $line = unpack 'b*', $line if $$ref[2]; # unpack to bits if using mask + return undef unless $line =~ $$ref[3]; # match regex + print STDERR '>', '>'x$lev, ' Value "', _escape_bytes($2), + '" at offset ', $$ref[1]+length($1), + " matches at $$ref[4]\n" + if $DEBUG; + return 1 unless $#$ref > 4; + + # Check nested rules and recurs + for (5..$#$ref) { + return 1 if _check_rule($$ref[$_], $fh, $lev+1); + } + print STDERR "> Failed nested rules\n" if $DEBUG && ! $lev; + return 0; +} +</pre> + +*"It seems it's a unique cause, that snails it all"* + +## Conclusion + +This describes an issue in the attachment filechecker with mime type detection. +The smallprof out file reveals it always fall back to using file which is very time-consuming. + +So what the hell did I put as complex allowed file attachment ruining File::Mimeinfo fast yet sparse recon ? +Well, it was set in the config this way: + +<tt>allowed_attachments => 'mimetype(image/*) or maxsize(5000kb) or mimetype(text/plain) or mimetype(text/css) or mimetype(video/*)'</tt> + +Ok... maybe the wildcards induce ....hum whatever... let's try something , the simplest thing : + +<tt>allowed_attachments => 'mimetype(text/plain) or mimetype(text/css)'</tt> + +Same slowness : yek, File::Mimeinfo recons nothing ... not even simplest files. + +Disabling it is a temporary cure obviously but it only took **30 seconds** . + +<tt>disable_plugins => [qw{filecheck}]</tt> + +I tried also to upgrade [[!cpan File::MimeInfo]] to current 0.16, did not helped either. :/ + +I opened a bug [[bugs/Slow_Filecheck_attachments___34__snails_it_all__34__]] + diff --git a/doc/users/pdurbin.mdwn b/doc/users/pdurbin.mdwn new file mode 100644 index 000000000..15ded8346 --- /dev/null +++ b/doc/users/pdurbin.mdwn @@ -0,0 +1 @@ +<http://greptilian.com> diff --git a/doc/users/tbm.mdwn b/doc/users/tbm.mdwn new file mode 100644 index 000000000..cd7491c56 --- /dev/null +++ b/doc/users/tbm.mdwn @@ -0,0 +1,3 @@ +[[!meta title="Martin Michlmayr"]] + +Currently trying to convert [my homepage](http://www.cyrius.com/) to ikiwiki. diff --git a/doc/users/undx.mdwn b/doc/users/undx.mdwn new file mode 100644 index 000000000..9b62209ce --- /dev/null +++ b/doc/users/undx.mdwn @@ -0,0 +1,7 @@ + + +IRL, I'm Emmanuel GALLOIS. + +This is my temporary ikiwiki user's page. + +Ciao. diff --git a/doc/users/wiebel.mdwn b/doc/users/wiebel.mdwn new file mode 100644 index 000000000..4d6997a9e --- /dev/null +++ b/doc/users/wiebel.mdwn @@ -0,0 +1,5 @@ +Started my [Homepage](http://wiebel.scorpius.uberspace.de/) with ikiwiki added some plugins like: + +* [hlinclude](https://wiebel.scorpius.uberspace.de/space/hlinclude/) -> addition to highlight to render a files content and provide it as a download, example can be seen at [favlinks](https://wiebel.scorpius.uberspace.de/code/favlink/), sadly it seem to be unable to render itself, meh +* [favlinks](https://wiebel.scorpius.uberspace.de/code/favlink/) -> to include favicons off linked Pages + |