answer about autofiles for tags
[ikiwiki] / doc / todo / A_page_that_inlines_pages__61____34____42____34___results_in_unnecessary_feed_generation.mdwn
1 I noticed when generating my wiki that all of my RSS feeds were
2 getting regenerated even when I edited only a page that did not affect
3 any feed.
4
5 I found that the problem only occurs in the presence of a file that
6 contains \[[!inline pages="*"]].
7
8 > How is this unexpected? By inlining _every_ page in the wiki, you're
9 > making that page depend on every other page; any change to any page in
10 > the wiki will result in the inlining page and its rss feed needing to be
11 > updated to include the changed page.
12
13 > At best, this is a [[wishlist]] optimisation item -- it would be nice if inline could
14 > somehow know that since it's only displaying N pages, a change to the
15 > N+1th page that its PageSpec matches is a no-op.
16 > --[[Joey]]
17
18 [[!tag done]]
19
20 Here's a short script for replicating the bug. Just cut and paste this
21 to a shell, (it will only muck in a new /tmp/ikiwiki-test directory
22 that it will create):
23
24         cd /tmp
25         mkdir ikiwiki-test; cd ikiwiki-test; mkdir src
26         echo '\[[!inline pages="blog/*"]]' > src/myblog.mdwn
27         mkdir src/blog; echo "A blog entry" > src/blog/entry.mdwn
28         echo 'use IkiWiki::Setup::Standard {
29                 srcdir => "src",
30                 destdir => "output",
31                 url => "http://example.com",
32                 templatedir => "/dev/null",
33                 underlaydir => "/dev/null",
34                 rss => 1,
35                 wrappers => [],
36                 verbose => 1,
37                 refresh => 1
38         }' > setup
39         ikiwiki --setup setup
40         ls -l --time-style=full-iso output/myblog/index.rss
41         echo "not a blog entry" > src/not-a-blog.mdwn
42         ikiwiki --setup setup
43         ls -l --time-style=full-iso output/myblog/index.rss
44         echo '\[[!inline pages="*"]]' > src/archives.mdwn
45         ikiwiki --setup setup
46         ls -l --time-style=full-iso output/myblog/index.rss
47         echo "still not blogging" >> src/not-a-blog.mdwn
48         ikiwiki --setup setup
49         ls -l --time-style=full-iso output/myblog/index.rss
50
51 Here's the tail of the output that I see for this command:
52
53         $ echo "not a blog entry" > src/not-a-blog.mdwn
54         $ ikiwiki --setup setup
55         refreshing wiki..
56         scanning not-a-blog.mdwn
57         rendering not-a-blog.mdwn
58         done
59         $ ls -l --time-style=full-iso output/myblog/index.rss
60         -rw-r--r-- 1 cworth cworth 459 2007-06-01 06:34:36.000000000 -0700 output/myblog/index.rss
61         $ echo '\[[!inline pages="*"]]' > src/archives.mdwn
62         $ ikiwiki --setup setup
63         refreshing wiki..
64         scanning archives.mdwn
65         rendering archives.mdwn
66         done
67         $ ls -l --time-style=full-iso output/myblog/index.rss
68         -rw-r--r-- 1 cworth cworth 459 2007-06-01 06:34:37.000000000 -0700 output/myblog/index.rss
69         $ echo "still not blogging" >> src/not-a-blog.mdwn
70         $ ikiwiki --setup setup
71         refreshing wiki..
72         scanning not-a-blog.mdwn
73         rendering not-a-blog.mdwn
74         rendering archives.mdwn, which depends on not-a-blog
75         done
76         $ ls -l --time-style=full-iso output/myblog/index.rss
77         -rw-r--r-- 1 cworth cworth 459 2007-06-01 06:34:38.000000000 -0700 output/myblog/index.rss
78
79 It looks like the rendering of archives.mdwn is also silently
80 generating myblog/index.rss.