Re: Acl and Auth slow page load
Index your aco table on alias ... On Aug 19, 1:15 am, Marcus J. Ertl [EMAIL PROTECTED] wrote: Marcus J. Ertl schrieb: Hi again! I'm afraid, this is poor application design on my side too. :-( OK, I took a look into this! It was bad design on my side! :-( I've startet with more then 60 queries, taking about 30 seconds! :-( After taking the check outside the loop, I'm down to 24 queries, taking about 10 seconds. Adding indexes to the acos- and aros-tables brought down the time for this queries to about 2 seconds! A closer look shows, it's allways the same query taking to long: *23. Affected: 36 Num. rows: 36 Took: 502ms* SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`, `Aco`.`foreign_key`, `Aco`.`alias` FROM `acos` AS `Aco` LEFT JOIN `acos` AS `Aco0` ON (`Aco0`.`alias` = 'links') LEFT JOIN `acos` AS `Aco1` ON (`Aco1`.`lft` `Aco0`.`lft` AND `Aco1`.`rght` `Aco0`.`rght` AND `Aco1`.`alias` = 'mod_edit') WHERE ((`Aco`.`lft` = `Aco0`.`lft` AND `Aco`.`rght` = `Aco0`.`rght`) OR (`Aco`.`lft` = `Aco1`.`lft` AND `Aco`.`rght` = `Aco1`.`rght`)) ORDER BY `Aco`.`lft` DESC This is not perfekt, but I can life with this values. But it would be nice, if I could get this querys down in time too! Will be there some acl-caching as core feature in cakephp 1.2? Or have I to do it by myself? Thank you very much! Bye Marcus smime.p7s 4KViewDownload --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Acl and Auth slow page load
francky06l schrieb: Hi! Index your aco table on alias ... I have allready done this! The results from the last mail are with this index! Bye Tiggr Indizes on acos: Name Typ KardinalitätFeld PRIMARY PRIMARY 433 id alias_index INDEX 36 alias tree_index INDEX 433 lft rght lft_index INDEX 433 lft rght_index INDEX 433 rght Indizes on aros: Name Typ KardinalitätFeld PRIMARY PRIMARY 30 id alias_index INDEX keine alias tree_index INDEX keine lft rght lft_index INDEX keine lft rght_index INDEX keine rght smime.p7s Description: S/MIME Cryptographic Signature
Re: Acl and Auth slow page load
Hi! var $components = array('Acl', 'Auth', 'Email'); The page load goes through the roof. Just the same for me, but only with Acl! And it isn't slow all the time, pages load fast when user isn't logged in, but after logging in, all is getting worse! Loadtime goes up through the roof because of the many sql-queries acl does! :-( I'm going to implement some sort of caching, but that's no real solution, only a work around! Is there a way to reduce the amount of queries in acl? Bye Marcus PS: It's my first page with cake...! You may have a look at the page at http://www.larp-welt.de, and at the code at http://code.google.com/p/cakelinks/source/browse/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Acl and Auth slow page load
Tiggr: How many queries is ACL component doing. Normally for a single check it is ~6 db calls. If you are doing more than one acl check per- page you should be caching the results, so you can use them over again. But caching is not part of the core ACL component. -Mark On Aug 18, 3:12 am, Tiggr [EMAIL PROTECTED] wrote: Hi! var $components = array('Acl', 'Auth', 'Email'); The page load goes through the roof. Just the same for me, but only with Acl! And it isn't slow all the time, pages load fast when user isn't logged in, but after logging in, all is getting worse! Loadtime goes up through the roof because of the many sql-queries acl does! :-( I'm going to implement some sort of caching, but that's no real solution, only a work around! Is there a way to reduce the amount of queries in acl? Bye Marcus PS: It's my first page with cake...! You may have a look at the page athttp://www.larp-welt.de, and at the code athttp://code.google.com/p/cakelinks/source/browse/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Acl and Auth slow page load
You might also index your aros/acos tables, according to the mode used in Auth ... On Aug 18, 10:51 pm, mark_story [EMAIL PROTECTED] wrote: Tiggr: How many queries is ACL component doing. Normally for a single check it is ~6 db calls. If you are doing more than one acl check per- page you should be caching the results, so you can use them over again. But caching is not part of the core ACL component. -Mark On Aug 18, 3:12 am, Tiggr [EMAIL PROTECTED] wrote: Hi! var $components = array('Acl', 'Auth', 'Email'); The page load goes through the roof. Just the same for me, but only with Acl! And it isn't slow all the time, pages load fast when user isn't logged in, but after logging in, all is getting worse! Loadtime goes up through the roof because of the many sql-queries acl does! :-( I'm going to implement some sort of caching, but that's no real solution, only a work around! Is there a way to reduce the amount of queries in acl? Bye Marcus PS: It's my first page with cake...! You may have a look at the page athttp://www.larp-welt.de, and at the code athttp://code.google.com/p/cakelinks/source/browse/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Acl and Auth slow page load
mark_story schrieb: Hi Mark! Tiggr: How many queries is ACL component doing. Normally for a single check it is ~6 db calls. If you are doing more than one acl check per- page you should be caching the results, so you can use them over again. But caching is not part of the core ACL component. I see 69 calls related to ACL! :-( I'm afraid, this is poor application design on my side too. :-( I go through a list of 10 entries (pagination, this is why they are max 10 entries per page.) On each entry I check for the rights to edit this entry! Thinking about it, I think it's no problem to put this checks outside the loop! Talking about it makes me thinking about it! Sorry about asking silly questions! I try to optimize my views, and tell you, if it get's better! Bye and thanks Marcus smime.p7s Description: S/MIME Cryptographic Signature
Re: Acl and Auth slow page load
Marcus J. Ertl schrieb: Hi again! I'm afraid, this is poor application design on my side too. :-( OK, I took a look into this! It was bad design on my side! :-( I've startet with more then 60 queries, taking about 30 seconds! :-( After taking the check outside the loop, I'm down to 24 queries, taking about 10 seconds. Adding indexes to the acos- and aros-tables brought down the time for this queries to about 2 seconds! A closer look shows, it's allways the same query taking to long: *23. Affected: 36 Num. rows: 36 Took: 502ms* SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`, `Aco`.`foreign_key`, `Aco`.`alias` FROM `acos` AS `Aco` LEFT JOIN `acos` AS `Aco0` ON (`Aco0`.`alias` = 'links') LEFT JOIN `acos` AS `Aco1` ON (`Aco1`.`lft` `Aco0`.`lft` AND `Aco1`.`rght` `Aco0`.`rght` AND `Aco1`.`alias` = 'mod_edit') WHERE ((`Aco`.`lft` = `Aco0`.`lft` AND `Aco`.`rght` = `Aco0`.`rght`) OR (`Aco`.`lft` = `Aco1`.`lft` AND `Aco`.`rght` = `Aco1`.`rght`)) ORDER BY `Aco`.`lft` DESC This is not perfekt, but I can life with this values. But it would be nice, if I could get this querys down in time too! Will be there some acl-caching as core feature in cakephp 1.2? Or have I to do it by myself? Thank you very much! Bye Marcus smime.p7s Description: S/MIME Cryptographic Signature