]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/optimisations.mdwn
* Add a separate pass to find page links, and only render each page once,
[ikiwiki.git] / doc / todo / optimisations.mdwn
1 * Don't render blog archive pages unless a page is added/removed. Just
2   changing a page doesn't affect the archives as they show only the title.
3
4 * Look at splitting up CGI.pm. But note that too much splitting can slow
5   perl down.
6
7 * The backlinks code turns out to scale badly to wikis with thousands of
8   pages. The code is O(N^2)! It's called for each page, and it loops
9   through all the pages to find backlinks.
10
11   Need to find a way to calculate and cache all the backlinks in one pass,
12   which could be done in at worst O(N), and possibly less (if they're
13   stored in the index, it could be constant time). But to do this, there
14   would need to be a way to invalidate or update the cache in these
15   situations:
16
17   - A page is added. Note that this can change a backlink to point to 
18     the new page instead of the page it pointed to before.
19   - A page is deleted. This can also change backlinks that pointed to that
20     page.
21   - A page is modified. Links added/removed.