On Apr 19, 2010, at 4:10 PM, mdipierro wrote: > web2py does something clever for view but very stupid for controllers. > > The good: > For each action is collapses its view, all extended views (layout for > example) and included views into a single pyc file. > > The bad: > For each action it generates one pyc that contains a copy of the > entire controller. > > The ugly: > The bad part can easily be fixed so that there is only one pyc per > controller and not per action but this breaks backward compatibility > for bytecode compiled apps. In the end we are using more space than > needed in order to perform less checks. I admit it is ugly.
Why does the compiled version include the .pyc files in controllers/ (outside of compiled/)? It doesn't seem like those get used, at least not by run_controller_in. And a minor thing: there's a lot of this kind of thing: path = os.path.join(folder, 'compiled/') Should the '/' really be part of the call? It sort of defeats the purpose of os.path.join. > > On Apr 19, 4:54 pm, Jonathan Lundell <jlund...@pobox.com> wrote: >> When I compile an app, and the install it, it appears that controllers show >> up twice: once in controllers/ as one .pyc per controller file, and again in >> compiled/, this time once per function. What's going on, and how are these >> files used? >> >> Also, the manual says: >> >>> Because views can extend and include other views in a tree, before bytecode >>> compilation, the view tree for every controller is collapsed into a single >>> file. >> >> But in compiled/, I see a view .pyc per function, not per controller. I >> assume that I'm misinterpreting something, but again: what's going on here? >> >> -- >> Subscription settings:http://groups.google.com/group/web2py/subscribe?hl=en