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 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.

Reply via email to