[ww-users] when previews go bad
Status: Beta
Brought to you by:
worden
From: Lee W. <wor...@gm...> - 2011-02-24 16:36:18
|
I've alluded to this in earlier email notices, conversations and such, but I think I should make it explicit: when your WorkingWiki project has a lot of big files in it, you will have trouble with previewing. This is because when you preview a page that includes source-file and project-file tags, WorkingWiki's back end makes a copy of the working directory so that your preview operations don't mix with the operations on the saved version of the files. When it's a big directory, it will take a long time to copy when you first start to preview a page. (In earlier versions it didn't do this copying, it just did everything in the original directory. That isn't sustainable because it can cause a huge amount of redundant recomputations when multiple people are using the wiki and garbled outputs when people preview changes but don't save them.) Sometime in the future, we may solve this problem by using a copy-on-write filesystem (http://en.wikipedia.org/wiki/Btrfs, for example), which will make the initial copy operation virtually instantaneous. In the present, here is what you can do to avoid slow previews. Create a separate project for the things you want to preview. Say your big files are in project P. Create a new project Q where you will do your development. Put the code you are working on, say file S, in project Q instead of project P. Locate it on a page where no files from project P are displayed. It will still require files in P, though: instead of just using file "T" in makefile rules you have to say "$(PROJECT_DIR_P)/T". In perl, R, and other languages there are similar syntaxes for getting the value of environment variable PROJECT_DIR_P. To make that environment variable appear, go to the Manage Project page for project Q and add project P to its list of prerequisites. Then check the "do not copy" box since that's the whole point of this exercise, and take note of (and possibly change) the variable name there. Then when you preview your work it will be quick, because it won't have to copy the big files in P. I'm happy to answer questions and register complaints. For relevant info see: http://lalashan.mcmaster.ca/theobio/projects/index.php/WorkingWiki/Documentation#Dependencies_between_projects Lee W |