Click here to Skip to main content
Click here to Skip to main content

CakePHP 2.0 Rant Retraction

, 23 May 2013
Rate this:
Please Sign up or sign in to vote.
CakePHP 2.0 rant retraction

Introduction

In yesterday's article, it appears I may have misunderstood something regarding lazy loading. I incorrectly read it as "loading the data" on-demand opposed to loading the object on-demand. This actually looks like a great feature, especially after reading this.

It appears that the associated models would automatically be loaded simply because they are related to the model you are querying, even if you are not retrieving data from it.

Thanks for the clarification on lazy loading Jose and I'm actually quite excited to see this change after further research into the situation. Check out the following benchmarks from the above mentioned article.

Before Lazy Loading

  • Total Requests made: 100
  • Total Time elapsed: 6.8480186462402 (seconds)
  • Requests/Second: 14.603 req/sec
  • Average request time: 0.068 seconds
  • Standard deviation of average request time: 0.002
  • Longest/shortest request: 0.078 sec/0.066 sec
  • Memory usage: 9.75MB

Post Lazy Loading

  • Total Requests made: 100
  • Total Time elapsed: 4.8957378864288 (seconds)
  • Requests/Second: 20.426 req/sec
  • Average request time: 0.049 seconds
  • Standard deviation of average request time: 0.001
  • Longest/shortest request: 0.056 sec/0.048 sec
  • Memory usage: 7.25MB

Almost 6 full requests more per second! Just in the 100 requests made, there is over 2 seconds being gained! Excellent work community!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Jamie Munro

Canada Canada
I am the author of three books: 20 Recipes for Programming PhoneGap, 20 Recipes for Programming MVC 3, and Rapid Application Development with CakePHP.
 
I enjoy reading and writing and I like to blog as much as I can on my personal blog EndYourIf.
 
I'm a father of three kids, twins (boy and a girl) and another baby girl.
Follow on   Twitter

Comments and Discussions

 
QuestionIt takes a big man to admit when he's wrong... PinmemberJohnny J.23-May-13 19:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 23 May 2013
Article Copyright 2013 by Jamie Munro
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid