Hi Massimo,

I double checked and all foreign keys are declared as "reference 
table_name". I also used the {{=response.toolbar()}} and looking at the 
tables item I see the expected tables are defined for each function and 
tables not in use are indeed lazy. All the pages except the initial landing 
page are @auth.requires_login() in the controller.

I might have a bad test case, not many tables, fairly complex views. The 
benchmark results for the shell based test are running very fast in sub 
microsecond times so even a dozen of those would add up to very little in 
the total service time of the pages in this app.

Thanks
Ron

On Tuesday, 28 August 2012 09:35:35 UTC-7, Massimo Di Pierro wrote:
>
> I'd expect something better. Add {{=response.toolbar()}} to your layout. 
> It will tell you which tables are lazy and which ones are now. Make you do 
> no have more tables than you need.
>
> For example using Field('....',db.auth_user) forces db.auth_user even if 
> not needed. Field('....','reference auth_user') will keep it lazy.
>
> On Monday, 27 August 2012 19:27:27 UTC-5, Ron McOuat wrote:
>>
>>
>> Thanks Anthony, this really helped confirm the lazy_tables=True is 
>> working as expected. On average I am using 8 to 10 tables out of 30 total 
>> per request depending on the URL visited. Here is the relevant output from 
>> httpserver.log when I ran the application through a sequence of operations. 
>> The applications are running on latest trunk as of Monday afternoon Aug 27.
>>
>> Results for application before lazy_tables conversion
>> 127.0.0.1, 2012-08-27 17:13:14, GET, /ccimsb/default/user/login, 
>> HTTP/1.1, 200, 0.040427
>> 127.0.0.1, 2012-08-27 17:13:18, POST, /ccimsb/default/user/login, 
>> HTTP/1.1, 303, 0.046311
>> 127.0.0.1, 2012-08-27 17:13:19, GET, /ccimsb/default/index, HTTP/1.1, 
>> 200, 0.085805
>> 127.0.0.1, 2012-08-27 17:13:23, GET, /ccimsb/map/index, HTTP/1.1, 303, 
>> 0.040259
>> 127.0.0.1, 2012-08-27 17:13:23, GET, /ccimsb/map/display/region/AK, 
>> HTTP/1.1, 200, 0.060424
>> 127.0.0.1, 2012-08-27 17:13:25, GET, /ccimsb/map/display/site/VDZ, 
>> HTTP/1.1, 200, 0.064545
>> 127.0.0.1, 2012-08-27 17:13:28, GET, 
>> /ccimsb/live/display/camera/VDZ/vdz-ca06, HTTP/1.1, 200, 0.249349
>> 127.0.0.1, 2012-08-27 17:13:31, GET, 
>> /ccimsb/live/display/camera/VDZ/vdz-ca07, HTTP/1.1, 200, 0.433233
>> 127.0.0.1, 2012-08-27 17:13:35, GET, /ccimsb/archive/site/VDZ, HTTP/1.1, 
>> 303, 0.118293
>> 127.0.0.1, 2012-08-27 17:13:35, GET, /ccimsb/archive/display/menu/VDZ, 
>> HTTP/1.1, 200, 0.066299
>> 127.0.0.1, 2012-08-27 17:13:36, POST, /ccimsb/archive/control/VDZ, 
>> HTTP/1.1, 200, 0.041629
>> 127.0.0.1, 2012-08-27 17:13:37, POST, /ccimsb/archive/control/VDZ, 
>> HTTP/1.1, 200, 0.045691
>> 127.0.0.1, 2012-08-27 17:13:40, GET, /ccimsb/default/user/logout, 
>> HTTP/1.1, 303, 0.047035
>> 127.0.0.1, 2012-08-27 17:13:40, GET, /ccimsb/default/index, HTTP/1.1, 
>> 200, 0.042211
>>
>> The applcation model converted to use lazy_tables
>> 127.0.0.1, 2012-08-27 17:11:21, GET, /ccims/default/user/login, HTTP/1.1, 
>> 200, 0.075939
>> 127.0.0.1, 2012-08-27 17:11:27, POST, /ccims/default/user/login, 
>> HTTP/1.1, 303, 0.060465
>> 127.0.0.1, 2012-08-27 17:11:27, GET, /ccims/default/index, HTTP/1.1, 200, 
>> 0.089743
>> 127.0.0.1, 2012-08-27 17:11:31, GET, /ccims/map/index, HTTP/1.1, 303, 
>> 0.029557
>> 127.0.0.1, 2012-08-27 17:11:31, GET, /ccims/map/display/region/AK, 
>> HTTP/1.1, 200, 0.058424
>> 127.0.0.1, 2012-08-27 17:11:36, GET, /ccims/map/display/site/VDZ, 
>> HTTP/1.1, 200, 0.057399
>> 127.0.0.1, 2012-08-27 17:11:39, GET, 
>> /ccims/live/display/camera/VDZ/vdz-ca06, HTTP/1.1, 200, 0.220563
>> 127.0.0.1, 2012-08-27 17:11:41, GET, 
>> /ccims/live/display/camera/VDZ/vdz-ca07, HTTP/1.1, 200, 0.450254
>> 127.0.0.1, 2012-08-27 17:11:43, GET, /ccims/archive/site/VDZ, HTTP/1.1, 
>> 303, 0.030611
>> 127.0.0.1, 2012-08-27 17:11:44, GET, /ccims/archive/display/menu/VDZ, 
>> HTTP/1.1, 200, 0.062489
>> 127.0.0.1, 2012-08-27 17:11:44, POST, /ccims/archive/control/VDZ, 
>> HTTP/1.1, 200, 0.029913
>> 127.0.0.1, 2012-08-27 17:11:49, POST, /ccims/archive/control/VDZ, 
>> HTTP/1.1, 200, 0.032068
>> 127.0.0.1, 2012-08-27 17:11:54, GET, /ccims/default/user/logout, 
>> HTTP/1.1, 303, 0.064506
>> 127.0.0.1, 2012-08-27 17:11:54, GET, /ccims/default/index, HTTP/1.1, 200, 
>> 0.030596
>>
>> This is an improvement in performance for the new lazy_tables. The login 
>> and logout numbers are a bit longer for the new version but it doesn't 
>> matter for that.
>>
>> Thanks for the many improvements,
>>
>> Ron
>>
>>

-- 



Reply via email to