In compileapp.py, after reading, parsing, and compiling a model, view,
or controller, if a .pyc cannot be written to disk, instead store the
compiled code, by file name/function, in a global dict so that next
request you can simply load the precompiled code directly from RAM.
Since web2py does not have an environment (does not distinguish
between development and production etc), the only way to update the
cached code is to check the mtime of each file on every request which
is wasteful in production where the code does not change, but not
nearly as wasteful as repeatedly reading, parsing and compiling.
Robin