What could make the controller action take 5 seconds and the corresponding view 3 seconds? Or in the case of the View 45 or more seconds? I have other Cake 2. I keep thinking their must be some config setting, turn debug off, or something, but nothing seems to make a difference.
This model has about 12 columns. So maybe that has something to do with it??? Index takes about 8. It definitely seems to be something in the 3. So one thing I figured out was the whole regeneration of Schemas on each request.
This would be a nice addition I think. After updating my app. I have no idea what manipulations of the data Cake is doing behind the scenes that could warrant taking almost 20 seconds to complete. What version of SQL Server, and the php sql server driver are you using? I remember having horrible sql server performance in the past This was about 3 years ago , and disabling xdebug solved all the issues.
BTW, the debug kit bar does give you are breakdown of metadata fetching if you open up the SQL panel. Might be a good idea to use xdebug to see what's taking up all the time, maybe a few bad queries or weird loop. You'd be surprised what a few well placed indexes can do to your queries. Maurits van der Schee. Post by Jeremy Burns Class Outfit I'm surprised how seldom people index their databases properly if at all Php files with.
I don't think any of us have had such slowness in between requests and I don't even have metadata cache enabled. Secondly, could anyone point me to where this code is for the meta data, I will see if I can isolate the problem - and if I do well - could try to find the fix! Interesting - I loaded it up on a testing server, and you guys are right - no issues at all, works amazingly fast!
I can - by the way - also confirm that the first "page load" is really slow compared to the fast ones following. I also often times get this error then with a very basic find operation involved :.
So make that a larger project with lots of tables and this might be an issue of a larger size. Also see comment - where you can see the same issue - only in CLI there is no time limit, thus it must be some endless loop making the script eating up all memory resources. Hey markstory - I am going to play around with some settings today to see if I can work out what it is that is causing it.
CakeCoded your best course of action IMO is to generate an xdebug profile as it will point out exactly where your php time is going. Hey markstory - I've isolated the problem - it is line of the Collection.
I don't know the fix, but I suggest markstory - there might be a way to rewrite that query, or fetch the data differently? Those are outstanding debugging skills CakeCoded , great job! That option might be good to document in the book. Information schema being slow sounds like a MySQL specific issue that can be solved with proper configuration.
For now, at least, we have the solution for Mysql. Alternatively if you are short for time, I can dig through this and submit a pull request. CakeCoded I think this is a problem that is best solved with documentation.
Documentation sounds like the right way to tackle that IMO. Leaving it up to the documentation relies on users reading it - many people could run their first query, release it is slow, and give up there. I think it is clear that re don't want stats on meta data on - would a better solution be to simply turn this off with an initial query? As a compromise lorenzo solution is a good one to make it a setting in the config file - though it still relies on an extra step. My concern is, is that this could affect many people, which means that it will cause much complaint.
Implicitly reconfiguring mysql is a bad idea. Documenting the solution and providing default config feels much better to me.
You can also solve this by properly configuring MySQL. Since the description and commented option has been added in the default app config file I think this issue can be closed. As stated by others the option shouldn't be implicitly set. Thanks lorenzo. I have installed CakePHP i. Also what exact version of Cake, and what DB version? All that is necessary to actually being able to answer you.
I have same problem, cake php 3. When i open pages with no query its slow. Or something simple like results from 10rows in table. On same xampp instalation i have cakephp 2. And i noticed its faster in chrome then firefox. Skip to content.
Star 8. New issue.
0コメント