I am trying to shave-off the needless DDL model definition in each request - when you have hundreds of tables with (cumulatively) thousands of fields, the needless overhead of having to re-compile all these objects on every request starts to add-up. It has nothing to do with auto-migration - you can still have auto-migration with schema-objects defined in an imported-module : every time the module changes, it re-compiles, and then auto-migration kicks in. I am talking about the coupling of "mostly"-static data with highly dynamic one - all within the same execution-architecture - it's a sub-optimal design. For small projects, that usually wouldn't matter, as the overhead would be small. For bigger projects though....
On Fri, Jan 17, 2014 at 4:52 PM, Anthony <[email protected]> wrote: > On Friday, January 17, 2014 2:18:50 AM UTC-5, Arnon Marcus wrote: >> >> A database scema is a description of the structure of a database - it has >> nothing to do with requests. >> You are talking about a convinience-feature that could have been >> implemented differently - this coupling is convinient but makes no sense >> from a performance standpoint. >> I am looking for a way around that... >> If there isn't any, it only means that for this to be possible it needs >> to be re-implemented in a way that would make that possible. > > > Yes, as I mentioned, the problem is not coupling the schema with the > connection but the fact that the model definition includes some relatively > static attributes (such as the database schema) as well as some more > dynamic attributes that might change from request to request. Your approach > would require a re-implementation, with the database schema held in a > structure separate from the rest of the model definition. On a typical > request, it's not clear how much gain that would give you -- maybe a few > milliseconds (though depending on your performance needs, I suppose that > could be meaningful). > > Anthony > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/WR6RAMRQesg/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

