Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am using 7-8 plugins with CakePHP, and the webpage takes from 3 to 6s to load . Why do plugins slow down CakePHP so much? O_O. I found out it is slow because it loads model in plugins (I disabled Cake's cache globally) (I use localhost to develop the website, Debug level = 2)

Using DebugKit, I found out Component initialization and startup takes 3s->6s, but I can't solve the problem.


i disabled all plugins and ONLY in model i add line

var $acts = array('Search.searchable','Tags.Tagged');(I disabled Cake's cache globally, disabled cache check and Cache.disable = true)

time load change from 1s -> 4s only with 1 line load Behavior in plugins 2 plugin code by core team cakePHP i dont think matter in plugin.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
289 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can have hundreds of plugins that don't do anything and have the page load in no time at all. Or you can have only one plugin that does a lot, or does it poorly, and have the page load time out. It's really not about the number, it's about what each plugin is doing.

As such, you either need to profile your app on a low level (e.g. http://www.xdebug.org/docs/profiler) or you need to switch plugins off one by one to see which one is the culprit.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...