| 1 | TODO list for agedu |
| 2 | =================== |
| 3 | |
| 4 | - stop trying to calculate an upper bound on the index file size. |
| 5 | Instead, just mmap it at initial size + delta, and periodically |
| 6 | re-mmap it during index building if it grows too big. If we run |
| 7 | out of address space, we'll hear about it eventually; and |
| 8 | computing upper bounds given the new optimised index tends to be |
| 9 | a factor of five out, which is bad because it'll lead to running |
| 10 | out of theoretical address space and erroneously reporting |
| 11 | failure long before we run out of it for real. |
| 12 | |
| 13 | - we could still be using more of the information coming from |
| 14 | autoconf. Our config.h is defining a whole bunch of HAVE_FOOs for |
| 15 | particular functions (e.g. HAVE_INET_NTOA, HAVE_MEMCHR, |
| 16 | HAVE_FNMATCH). We could usefully supply alternatives for some of |
| 17 | these functions (e.g. cannibalise the PuTTY wildcard matcher for |
| 18 | use in the absence of fnmatch, switch to vanilla truncate() in |
| 19 | the absence of ftruncate); where we don't have alternative code, |
| 20 | it would perhaps be polite to throw an error at configure time |
| 21 | rather than allowing the subsequent build to fail. |
| 22 | + however, I don't see anything here that looks very |
| 23 | controversial; IIRC it's all in POSIX, for one thing. So more |
| 24 | likely this should simply wait until somebody complains. |
| 25 | |
| 26 | - IPv6 support in the HTTP server |
| 27 | * of course, Linux magic auth can still work in this context; we |
| 28 | merely have to be prepared to open one of /proc/net/tcp or |
| 29 | /proc/net/tcp6 as appropriate. |
| 30 | |
| 31 | - run-time configuration in the HTTP server |
| 32 | * I think this probably works by having a configuration form, or |
| 33 | a link pointing to one, somewhere on the report page. If you |
| 34 | want to reconfigure anything, you fill in and submit the form; |
| 35 | the web server receives HTTP GET with parameters and a |
| 36 | referer, adjusts its internal configuration, and returns an |
| 37 | HTTP redirect back to the referring page - which it then |
| 38 | re-renders in accordance with the change. |
| 39 | * All the same options should have their starting states |
| 40 | configurable on the command line too. |
| 41 | |
| 42 | - curses-ish equivalent of the web output |
| 43 | + try using xterm 256-colour mode. Can (n)curses handle that? If |
| 44 | not, try doing it manually. |
| 45 | + I think my current best idea is to bypass ncurses and go |
| 46 | straight to terminfo: generate lines of attribute-interleaved |
| 47 | text and display them, so we only really need the sequences |
| 48 | "go here and display stuff", "scroll up", "scroll down". |
| 49 | + Infrastructure work before doing any of this would be to split |
| 50 | html.c into two: one part to prepare an abstract data |
| 51 | structure describing an HTML-like report (in particular, all |
| 52 | the index lookups, percentage calculation, vector arithmetic |
| 53 | and line sorting), and another part to generate the literal |
| 54 | HTML. Then the former can be reused to produce very similar |
| 55 | reports in coloured plain text. |
| 56 | |
| 57 | - http://msdn.microsoft.com/en-us/library/ms724290.aspx suggest |
| 58 | modern Windowses support atime-equivalents, so a Windows port is |
| 59 | possible in principle. |
| 60 | + For a full Windows port, would need to modify the current |
| 61 | structure a lot, to abstract away (at least) memory-mapping of |
| 62 | files, details of disk scan procedure, networking for httpd. |
| 63 | Unclear what the right UI would be on Windows, too; |
| 64 | command-line exactly as now might be considered just a |
| 65 | _little_ unfriendly. Or perhaps not. |
| 66 | + Alternatively, a much easier approach would be to write a |
| 67 | Windows version of just the --scan-dump mode, which does a |
| 68 | filesystem scan via the Windows API and generates a valid |
| 69 | agedu dump file on standard output. Then one would simply feed |
| 70 | that over the network connection of one's choice to the rest |
| 71 | of agedu running on Unix as usual. |
| 72 | |
| 73 | - it might conceivably be useful to support a choice of indexing |
| 74 | strategies. The current "continuous index" mechanism' tradeoff of |
| 75 | taking O(N log N) space in order to be able to support any age |
| 76 | cutoff you like is not going to be ideal for everybody. A second |
| 77 | more conventional "discrete index" mechanism which allows the |
| 78 | user to specify a number of fixed cutoffs and just indexes each |
| 79 | directory on those alone would undoubtedly be a useful thing for |
| 80 | large-scale users. This will require considerable thought about |
| 81 | how to make the indexers pluggable at both index-generation time |
| 82 | and query time. |
| 83 | * however, now we have the cut-down version of the continuous |
| 84 | index, it might be the case that the space gain is no longer |
| 85 | worthwhile. |