]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/A_page_that_inlines_pages__61____34____42____34___results_in_unnecessary_feed_generation.mdwn
web commit by madmax
[ikiwiki.git] / 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 Here's a short script for replicating the bug. Just cut and paste this
19 to a shell, (it will only muck in a new /tmp/ikiwiki-test directory
20 that it will create):
21
22         cd /tmp
23         mkdir ikiwiki-test; cd ikiwiki-test; mkdir src
24         echo '\[[inline pages="blog/*"]]' > src/myblog.mdwn
25         mkdir src/blog; echo "A blog entry" > src/blog/entry.mdwn
26         echo 'use IkiWiki::Setup::Standard {
27                 srcdir => "src",
28                 destdir => "output",
29                 url => "http://example.com",
30                 templatedir => "/dev/null",
31                 underlaydir => "/dev/null",
32                 rss => 1,
33                 wrappers => [],
34                 verbose => 1,
35                 refresh => 1
36         }' > setup
37         ikiwiki --setup setup
38         ls -l --time-style=full-iso output/myblog/index.rss
39         echo "not a blog entry" > src/not-a-blog.mdwn
40         ikiwiki --setup setup
41         ls -l --time-style=full-iso output/myblog/index.rss
42         echo '\[[inline pages="*"]]' > src/archives.mdwn
43         ikiwiki --setup setup
44         ls -l --time-style=full-iso output/myblog/index.rss
45         echo "still not blogging" >> src/not-a-blog.mdwn
46         ikiwiki --setup setup
47         ls -l --time-style=full-iso output/myblog/index.rss
48
49 Here's the tail of the output that I see for this command:
50
51         $ echo "not a blog entry" > src/not-a-blog.mdwn
52         $ ikiwiki --setup setup
53         refreshing wiki..
54         scanning not-a-blog.mdwn
55         rendering not-a-blog.mdwn
56         done
57         $ ls -l --time-style=full-iso output/myblog/index.rss
58         -rw-r--r-- 1 cworth cworth 459 2007-06-01 06:34:36.000000000 -0700 output/myblog/index.rss
59         $ echo '\[[inline pages="*"]]' > src/archives.mdwn
60         $ ikiwiki --setup setup
61         refreshing wiki..
62         scanning archives.mdwn
63         rendering archives.mdwn
64         done
65         $ ls -l --time-style=full-iso output/myblog/index.rss
66         -rw-r--r-- 1 cworth cworth 459 2007-06-01 06:34:37.000000000 -0700 output/myblog/index.rss
67         $ echo "still not blogging" >> src/not-a-blog.mdwn
68         $ ikiwiki --setup setup
69         refreshing wiki..
70         scanning not-a-blog.mdwn
71         rendering not-a-blog.mdwn
72         rendering archives.mdwn, which depends on not-a-blog
73         done
74         $ ls -l --time-style=full-iso output/myblog/index.rss
75         -rw-r--r-- 1 cworth cworth 459 2007-06-01 06:34:38.000000000 -0700 output/myblog/index.rss
76
77 It looks like the rendering of archives.mdwn is also silently
78 generating myblog/index.rss.