marrtins Posted January 31, 2013 Report Share Posted January 31, 2013 Jebkurā gad 25sek uz 500 itemiem - tas ir kaut kas nenormāls. Quote Link to comment Share on other sites More sharing options...
codez Posted January 31, 2013 Report Share Posted January 31, 2013 Jebkurā gad 25sek uz 500 itemiem - tas ir kaut kas nenormāls. Viņš tur izmanto kaut kādu ORM, kas drošvien taisa bezmazvai 500 SELECTus vai kas tamlīdzīgs. Tāpēc tik lēni. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 31, 2013 Report Share Posted January 31, 2013 (edited) Parādi kurš ORM taisa 500 kverijus... :D Edited January 31, 2013 by daGrevis Quote Link to comment Share on other sites More sharing options...
codez Posted January 31, 2013 Report Share Posted January 31, 2013 Parādi kurš ORM taisa 500 kverijus... :DNu tak viņš kodu ielika.http://pastebin.com/7KvLDKdP foreach ($product->getCategoryIds() as $category_id) { $category = Mage::getModel('catalog/category')->load($category_id); Quote Link to comment Share on other sites More sharing options...
F3llony Posted January 31, 2013 Report Share Posted January 31, 2013 Šajos gadījumos lietotājam/servisam būs jāgaida tās pašas 25 sekundes, ja notiek ģenerēšana :) Neredzu ieguvumu salīdzinājumā ar crontab. Es teicu Izmaiņas... Kāpēc Tu uzreiz padomāji exportu no DB?. Nu tak viņš kodu ielika. http://pastebin.com/7KvLDKdP foreach ($product->getCategoryIds() as $category_id) { $category = Mage::getModel('catalog/category')->load($category_id); Iterators? ... Bet nu var jau būt, ka kāds lāme rakstījis... Quote Link to comment Share on other sites More sharing options...
rpr Posted January 31, 2013 Report Share Posted January 31, 2013 tur jau izskatās, ka produkti x5 selecti. katrs load un collection vēl uztaisa katram produktam selektu. katram produktam vēl x kategorijas selekti un citi pribambasi. Quote Link to comment Share on other sites More sharing options...
codez Posted January 31, 2013 Report Share Posted January 31, 2013 Iterators? ... Bet nu var jau būt, ka kāds lāme rakstījis... Nu tās 25 sekundes uz tiem 500 ierakstiem ļoti precīzi velk uz to, ka tiek taisīts selects katru reizi. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 31, 2013 Report Share Posted January 31, 2013 Ā, ok. Ar āmuru arī var iesist skrūvi. Quote Link to comment Share on other sites More sharing options...
Pieduriens Posted January 31, 2013 Author Report Share Posted January 31, 2013 Joprojām paldies par turpinājumu diskusijai. Vai lāme rakstijusi, jā varētu teikt arī tā..pff..:( Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.