On Thursday, July 20, 2017 at 2:45:09 PM UTC-4, Alex Glaros wrote: > Jim, regarding "That said, if you've got 500 tables in your app, you probably > don't want to use the web2py default table instantiation on every request." > > > 1. did you mean to put db.py model tables into categorized sub tables - e.g., > accounting_related_tables.py, email_related_tables.py, > inventory_related_tables.py? > > > 2. does splitting models into sub files improve performance if there are > hundreds of tables?
No, merely splitting table definitions into multiple model files will not help, as they will all still be executed. Instead, you must specifically use conditional models, either using the default /controller/function subfolders or by specifying a custom response.models_to_run. See http://web2py.com/books/default/chapter/29/04/the-core#Conditional-models. Alternatively, you can define models in modules and import where needed. 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/d/optout.

