On Feb 24, 5:01 am, Chris <[email protected]> wrote:
> Is one faster/more efficient than the other?

I would say that modules are more efficient, in the sense that they
are not always executed while models are.    You can control when to
import a module, but (all) models are executed on each request.

Furthermore, as a web framework, web2py falls into the standard "IO-
bound" application-type class, which means that code execution is
going to be several orders of magnitude faster than fetching a page.
As for scaling, it is the database that first begins to take strain,
not the application code, since the application code can be forked
continuously while the data generally sits in one location that must
be shared between all requests (pooling and other tricks
notwithstanding).

So my answer is that unless you need code to be always available, it
is probably better to use modules, but in the larger scheme of things
goes, the distinction between the two methods *probably* doesn't
matter for the purposes of performance.

If you happen to test it and get some hard numbers, please post that
back here.

Reply via email to