Hi, I with miso result that parsing doesn't slow down webyast I check what take 
so much time and I found that we have increadible amount of unnecessary 
communication in webyast.
So I propose these two changes which should speed up webyast:

in webclient store together with site, login and auth_token also resources for 
such site and permission for site and user.

advantages:
- reduce communication between webclient and rest-service so It should speed up 
webyast
- client side caching ( now permissions and resources is cached at 
rest-service) has advantage that it doesn't require communication and parsing 
of result

disadvantage:
- permissions which affect which form is disabled is refreshed only during 
login (of course it doesn't affect permission checking in rest-service). So if 
user change permission for itself, then he must relogin to affect forms.

I plan to experimental implementation in own branch, so if you have any 
comments and ideas I welcome it.

Josef


JFYI: communication for one show of time page (all request is quite quick, but 
each of them need some communication overload):

Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:20) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 119ms (View: 10, DB: 1) | 200 OK [http://localhost/resources.xml]


Processing NtpController#show to xml (for 127.0.0.1 at 2010-06-30 15:28:20) 
[GET]
  Parameters: {"format"=>"xml", "action"=>"show", "controller"=>"ntp"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
greped server list is europe.pool.ntp.org
Completed in 274ms (View: 12, DB: 0) | 200 OK [http://localhost/ntp.xml]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:21) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 51ms (View: 7, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing SystemtimeController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:21) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", "controller"=>"systemtime"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Action: org.opensuse.yast.modules.yapi.time.read User: jreidinger Result: ok
Completed in 935ms (View: 8, DB: 0) | 200 OK [http://localhost/systemtime.xml]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:23) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 35ms (View: 7, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing PermissionsController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:24) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", 
"filter"=>"org.opensuse.yast.modules.yapi.time", "user_id"=>"jreidinger", 
"controller"=>"permissions"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Cache read: permissions:timestamp
Cache write: permissions:timestamp
Action: org.opensuse.yast.modules.yapi.time.read User: jreidinger Result: ok
Action: org.opensuse.yast.modules.yapi.time.write User: jreidinger Result: ok
Completed in 94ms (View: 13, DB: 0) | 200 OK 
[http://localhost/permissions.xml?filter=org.opensuse.yast.modules.yapi.time&user_id=jreidinger]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:24) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 35ms (View: 7, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing PermissionsController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:24) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", 
"filter"=>"org.opensuse.yast.modules.yapi.ntp", "user_id"=>"jreidinger", 
"controller"=>"permissions"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Cache read: permissions:timestamp
Action: org.opensuse.yast.modules.yapi.ntp.synchronize User: jreidinger Result: 
ok
Action: org.opensuse.yast.modules.yapi.ntp.setserver User: jreidinger Result: ok
Completed in 92ms (View: 10, DB: 0) | 200 OK 
[http://localhost/permissions.xml?filter=org.opensuse.yast.modules.yapi.ntp&user_id=jreidinger]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:25) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 35ms (View: 7, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing PermissionsController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:25) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", 
"filter"=>"org.opensuse.yast.modules.yapi.services", "user_id"=>"jreidinger", 
"controller"=>"permissions"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Cache read: permissions:timestamp
Action: org.opensuse.yast.modules.yapi.services.read User: jreidinger Result: ok
Action: org.opensuse.yast.modules.yapi.services.execute User: jreidinger 
Result: ok
Completed in 94ms (View: 10, DB: 0) | 200 OK 
[http://localhost/permissions.xml?filter=org.opensuse.yast.modules.yapi.services&user_id=jreidinger]


Processing NtpController#show to xml (for 127.0.0.1 at 2010-06-30 15:28:25) 
[GET]
  Parameters: {"format"=>"xml", "action"=>"show", "controller"=>"ntp"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
greped server list is europe.pool.ntp.org
Completed in 108ms (View: 12, DB: 0) | 200 OK [http://localhost/ntp.xml]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:26) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 35ms (View: 7, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing PermissionsController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:26) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", 
"filter"=>"org.opensuse.yast.modules.yapi.ntp", "user_id"=>"jreidinger", 
"controller"=>"permissions"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Cache read: permissions:timestamp
Action: org.opensuse.yast.modules.yapi.ntp.synchronize User: jreidinger Result: 
ok
Action: org.opensuse.yast.modules.yapi.ntp.setserver User: jreidinger Result: ok
Completed in 88ms (View: 10, DB: 0) | 200 OK 
[http://localhost/permissions.xml?filter=org.opensuse.yast.modules.yapi.ntp&user_id=jreidinger]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:26) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 34ms (View: 7, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing PermissionsController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:26) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", 
"filter"=>"org.opensuse.yast.modules.yapi.services", "user_id"=>"jreidinger", 
"controller"=>"permissions"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Cache read: permissions:timestamp
Action: org.opensuse.yast.modules.yapi.services.read User: jreidinger Result: ok
Action: org.opensuse.yast.modules.yapi.services.execute User: jreidinger 
Result: ok
Completed in 90ms (View: 10, DB: 0) | 200 OK 
[http://localhost/permissions.xml?filter=org.opensuse.yast.modules.yapi.services&user_id=jreidinger]


Processing NtpController#show to xml (for 127.0.0.1 at 2010-06-30 15:28:27) 
[GET]
  Parameters: {"format"=>"xml", "action"=>"show", "controller"=>"ntp"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
greped server list is europe.pool.ntp.org
Completed in 108ms (View: 12, DB: 0) | 200 OK [http://localhost/ntp.xml]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:27) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 34ms (View: 7, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing PermissionsController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:27) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", 
"filter"=>"org.opensuse.yast.modules.yapi.ntp", "user_id"=>"jreidinger", 
"controller"=>"permissions"}
  Account Load (0.4ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Cache read: permissions:timestamp
Action: org.opensuse.yast.modules.yapi.ntp.synchronize User: jreidinger Result: 
ok
Action: org.opensuse.yast.modules.yapi.ntp.setserver User: jreidinger Result: ok
Completed in 96ms (View: 8, DB: 0) | 200 OK 
[http://localhost/permissions.xml?filter=org.opensuse.yast.modules.yapi.ntp&user_id=jreidinger]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:28) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 35ms (View: 7, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing PermissionsController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:28) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", 
"filter"=>"org.opensuse.yast.modules.yapi.services", "user_id"=>"jreidinger", 
"controller"=>"permissions"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Cache read: permissions:timestamp
Action: org.opensuse.yast.modules.yapi.services.read User: jreidinger Result: ok
Action: org.opensuse.yast.modules.yapi.services.execute User: jreidinger 
Result: ok
Completed in 85ms (View: 10, DB: 0) | 200 OK 
[http://localhost/permissions.xml?filter=org.opensuse.yast.modules.yapi.services&user_id=jreidinger]


Processing NtpController#show to xml (for 127.0.0.1 at 2010-06-30 15:28:28) 
[GET]
  Parameters: {"format"=>"xml", "action"=>"show", "controller"=>"ntp"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
greped server list is europe.pool.ntp.org
Completed in 189ms (View: 93, DB: 0) | 200 OK [http://localhost/ntp.xml]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:28) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 99ms (View: 71, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing PermissionsController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:29) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", 
"filter"=>"org.opensuse.yast.modules.yapi.ntp", "user_id"=>"jreidinger", 
"controller"=>"permissions"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Cache read: permissions:timestamp
Action: org.opensuse.yast.modules.yapi.ntp.synchronize User: jreidinger Result: 
ok
Action: org.opensuse.yast.modules.yapi.ntp.setserver User: jreidinger Result: ok
Completed in 167ms (View: 91, DB: 0) | 200 OK 
[http://localhost/permissions.xml?filter=org.opensuse.yast.modules.yapi.ntp&user_id=jreidinger]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:29) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 99ms (View: 71, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing PermissionsController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:29) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", 
"filter"=>"org.opensuse.yast.modules.yapi.services", "user_id"=>"jreidinger", 
"controller"=>"permissions"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Cache read: permissions:timestamp
Action: org.opensuse.yast.modules.yapi.services.read User: jreidinger Result: ok
Action: org.opensuse.yast.modules.yapi.services.execute User: jreidinger 
Result: ok
Completed in 167ms (View: 88, DB: 0) | 200 OK 
[http://localhost/permissions.xml?filter=org.opensuse.yast.modules.yapi.services&user_id=jreidinger]


Processing NtpController#show to xml (for 127.0.0.1 at 2010-06-30 15:28:29) 
[GET]
  Parameters: {"format"=>"xml", "action"=>"show", "controller"=>"ntp"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
greped server list is europe.pool.ntp.org
Completed in 114ms (View: 13, DB: 0) | 200 OK [http://localhost/ntp.xml]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:30) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 113ms (View: 7, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing PermissionsController#show to xml (for 127.0.0.1 at 2010-06-30 
15:28:30) [GET]
  Parameters: {"format"=>"xml", "action"=>"show", 
"filter"=>"org.opensuse.yast.modules.yapi.ntp", "user_id"=>"jreidinger", 
"controller"=>"permissions"}
  Account Load (0.3ms)   SELECT * FROM "accounts" WHERE 
("accounts"."remember_token" = 'bd6b32f31292d1f91dd2e1269f8fa98e4f92b905') 
LIMIT 1
Cache read: permissions:timestamp
Action: org.opensuse.yast.modules.yapi.ntp.synchronize User: jreidinger Result: 
ok
Action: org.opensuse.yast.modules.yapi.ntp.setserver User: jreidinger Result: ok
Completed in 167ms (View: 13, DB: 0) | 200 OK 
[http://localhost/permissions.xml?filter=org.opensuse.yast.modules.yapi.ntp&user_id=jreidinger]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:30) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 110ms (View: 8, DB: 0) | 200 OK [http://localhost/resources.xml]


Processing ResourcesController#index to xml (for 127.0.0.1 at 2010-06-30 
15:28:31) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"resources"}
Completed in 105ms (View: 7, DB: 0) | 200 OK [http://localhost/resources.xml]


-- 
Josef Reidinger
YaST team
maintainer of perl-Bootloader, YaST2-Repair, parts of webyast
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to