1 Saving a wiki page in ikwiki or
2 <tt>ikiwiki --setup wiki.setup --rebuild</tt> takes a **dozen minutes** on a tiny tiny wiki (10 user-added pages)!
4 I profiled ikiwiki with [[!cpan Devel::SmallProf]] : see [[users/mathdesc]] for details.
6 And I came to the conclusion that [[plugins/filecheck]] on attachment was the only cause.
7 It always go the fallback code using time-consuming file even there it's look like it's
13 # First, try File::Mimeinfo. This is fast, but doesn't recognise
15 eval q{use File::MimeInfo::Magic};
19 my $mimetype=File::MimeInfo::Magic::magic($file);
22 # Fall back to using file, which has a more complete
24 if (! defined $mimetype) {
25 open(my $file_h, "-|", "file", "-bi", $file);
30 if (! defined $mimetype || $mimetype !~s /;.*//) {
31 # Fall back to default value.
32 $mimetype=File::MimeInfo::Magic::default($file)
34 if (! defined $mimetype) {
40 I found on [[plugins/filecheck/discussion/]] what [[users/DavidBremner/]] described as :
41 > no way to detect text/plain using File::MimeInfo::Magic::magic()
42 But I can't figure out if my issue is boarder and includes this or not..
44 Any ideas , solve :) more that welcome.
46 > [[done]], as isbear noted in [[discussion]], there was a bug that
47 > prevented File::MimeInfo::Magic from ever being used. --[[Joey]]