CodeIgniter from Scratch: Profiling, Benchmarking & Hooks
videos

CodeIgniter from Scratch: Profiling, Benchmarking & Hooks

Tutorial Details
  • Topic: CodeIgniter
  • Difficulty: Moderate
  • Tut Format: Video
This entry is part 15 of 17 in the CodeIgniter From Scratch Session
« PreviousNext »

In this 15th episode of the series, we are going to learn about three subjects: Profiling, Benchmarking and Hooks. You can use these tools to analyze your CodeIgniter applications performance, and figure out what part of the code you need to optimize. We are also going to make even further improvements to the Profiler library to suit our needs.


Catch Up


Day 15: Profiling, Benchmarking & Hooks

Premium Members: Download this Video ( Must be logged in)
Day 15

Thanks for watching! Any questions/thoughts?

Add Comment

Discussion 57 Comments

  1. Thanks a lot for this post.
    Definitely this is the best series on Nettuts.
    CI RULZZZZ……… :-)

  2. Parvez says:

    This is the best serise i ever seen on nettuts. and i also started learning CI from this series…Thanks for this post ;)

  3. piyanistll says:

    very very good working thanks a lot

  4. The next part of this series should cover ORM.

  5. Firstly thank you very much for this gr8 tutorials.
    But i have some requests if possible.
    1. Can you create more important video tutorials ? Because most people won’t use benchmarking tools. It’s not a common thing to use .
    2. Instead of this lets say “non-popular” topics , can you explain for example writing a membership system , writing template system, doctrine on codeigniter(2.0) or other ORMs on codeigniter , backend pro etc.
    They are more useful i think.
    Thank you for tutorials. I will be looking for more tutorials.
    Kolay gelsin hocam.

  6. eric says:

    Thanks for the Red Meat Burak!!!!!!

    I was starting to get skinny on all of the Tofu for the last few days…..

  7. Jaspal Singh says:

    Thanks Burak,
    Nice post on CodeIgniter – profiling, benchmarking & Hooks.

  8. Kyle says:

    Great explanation on how to use hooks. Thanks, Burak!

  9. David says:

    Could somebody make a tutorial like this for Zend Framework?

  10. Niklas says:

    Wonderful! Thanks for this!

  11. Cool article, and the series is great, even if I used CI before. It shows you a style of programming.

  12. Marcin says:

    This series is excellent. I sometimes wonder how much it helped CodeIgniter grow in popularity – I am pretty sure that such fantastic resources as provided here may encourage a lot of people to try this particular framework as opposed to the other ones which do not have such well-explained tutorials.

  13. erminio ottone says:

    GREAT :) thanks!

    you know would be so great? a full lesson about debug triks.

  14. Aryan says:

    WOW! Greatttttttttttttttttttt!

  15. Paul du Long says:

    Can’t find the video in the Plus section, the link under the video links to the 14th episode :(

  16. awake says:

    Baruk,

    According to PHP.NET, Methods with the same name as the last element of a namespaced class name will no longer be treated as constructor. This change doesn’t affect non-namespaced classes.

    Just FYI

  17. Matthew V says:

    Excellent!

    I’m writing a CI application now and have looked into benchmarking on the documentation site, but could not make any sense of it.

    This video helped me alot.

    Any chance of video on all of CI’s debugging methods?

    Thanks

  18. Khalil says:

    The next part of this series should cover CI Web Page Caching and CI output class. (Cache)
    What do you say guys? Please request…

  19. Darren Lunn says:

    This is extremely valuable. I always prefer to build-test-build-test. That way I can refactor stuff as I go. This helps me do that. Very good article, Burak – thanks.

    When you build-build-build-test – it leaves you a mountain to climb when you finally start testing and something needs reworking, which is horrifically unproductive and a frequent deadline killer.

  20. Lubaka says:

    Very great video, specially for extending Profiler.php
    I still can’t download this video. Why?

  21. Niklas says:

    Thank you Burak. Good tutorial!
    In the next tutorial I would like to request a small piece of URI-thinking while using CI. Tips for mixing the URI and the regular querystring. With all segments and stuff. I think it´s annoying to feel dependent of knowing where a specific filter is positioned in the URL (segment position).

  22. Tim says:

    Profiling and benchmarks are hugely important. For anyone who is already building apps or has apps in the wild it is a great tool to help you find bottlenecks in your service.

    And I don’t understand why all of you are asking for ORMs? Use active record in your models and stay away from the overhead.

  23. nadeem says:

    can’t find the video download in the plus section

    • I am working in CI from last 2 years, I just wanna say that If a beginner read these tutorials once then he can get much knowledge about CI. Codeigniter tutorials on net-tuts focus on useful and effective functions on CI. Keep Rocking CI.

      • Imran Khan says:

        even your site too rocking. so many useful information zeeshan rasool. Net-tuts made me to focus on a a best PHP framework easy and lighter.

        Thanks for net-tuts.

      • Lucho says:

        I second that, I’ve been working with (and on) CI for about the same time, and I have never looked back since, it’s simple, easily extensible and powerful, it’s like the jQuery of php ;P

  24. ibura says:

    attn: jeff way – what’s wrong with the download? even though i have logged in and tried to download the episode it ain’t working.

  25. Brad says:

    Thanks Burak! As usual very well done!

  26. the one says:

    plz any link to download this tut

  27. Luciano says:

    Great tutorial! Just can’t live without CI, I love that framework!
    I should point out that there’s no need to literally copy and paste the CI_Profiler::run() function when overriding it if you are not changing the code of the function itself but just adding code after it, since CI_Profiler::run just returns the output. Here’s a simpler way:

    class MY_Profiler extends CI_Profiler
    {
    public function run()
    {
    $output = parent::run();

    // here you can save $output to file and whatnot

    return “”;
    }
    }

    About xdebug, I’ve been using that for several months now and it’s just great, it’s a tool a developer just cannot miss.

  28. Radi says:

    Great Work! Thx =)

  29. Great tut Burak. Your tuts keep getting better and better. This one is a very insightful post. Particularly from the the standpoint of proper use of hooks and extending the core through “MY_” variants. Both of which are easy solutions to allow you to change the basic functionality of the framework without hacking any core code whatsoever.

    Again, good stuff!

  30. Diana says:

    Just wanted to say thanks. You’re doing a great job.

  31. Thanks a lot for this post…I’ve always been hesitant to start CI though have always thought of doing so. This share have made it so easy for me to do it now.

  32. Thanks a lot for this amazing tutorials!!
    I’ve been learning CodeIgniter and love it!!

    A question: public access to the system folder from the browser doesn’t cause a little security risk? Aside from the fact that each file is protected from direct reading, I wonder if it would be better to deny any access to the system folder (with .htaccess for example).

  33. chhivsob says:

    Great article, i like your post, want to say thank u for your post

  34. Lexperts says:

    I want to download the screencast. But the download link is nog working. I have a premium account!

  35. emcgfx says:

    I’ve created new resources page on my blog, where I have included all the CodeIgniter links to videos and source code. So people can easier find it, instead of reading all the comments :-) I’ll be updated when new articles comes out. http://gravityfx.org/resources/ I hope you guys find it useful. Thanks to NetTuts+ of course for all they hard work. I don’t take any credit for the videos/links. I simply link to direct links for people who want to download the videos and watch on other devices instead of just streaming.

  36. nice article!
    I will be very useful
    CI use in my projects.
    Desenvolvedor web

  37. siryu says:

    Dear Jeffrey Way and Burak, is there any tutorial to integrated WYSIWYG TinyMCE with CodeIgniter??

    Becoz I already following step by step from another tutorial but still I can’t see this Tiny MCE in my view.

    Thx btw for your Awesome tutorial..

  38. Kaniadona says:

    How to make localization using codeigniter
    i would make website contain 2 languages :D

    very nice tutorial Burak, keep writing :)

  39. vaff says:

    What about a implementation of a authentication for production use ? … im thinking about implementing ion_auth or even zend_auth into codeigniter

  40. TuxLyn says:

    Day 15 zip file with all the files in this video would be helpful :)

  41. Tate says:

    In CodeIgniter 2.0.2, the logs file is now only in the application folder and I cannot access it by “http://localhost/ci_series/CI_15/logs/profiler.php”.

    Also, all the methods in the Profiler.php file are now protected (except for the constructor and run methods), so how do you get the peak benchmarks?

  42. yabi90 says:

    Hi Burak,
    I used the hook to check login session, and I got a Redirect error 310,
    this is my code :
    ============== hook declaration ================
    $hook['post_controller_constructor'] = array(
    ‘class’ => ‘MySession’,
    ‘function’ => ‘check’,
    ‘filename’ => ‘mysession.php’,
    ‘filepath’ => ‘hooks’
    );

    ============================================
    ============= hook class =====================
    class MySession {
    function check(){
    $CI=& get_instance();
    $CI->load->helper(‘url’);
    session_start();
    (isset($_SESSION['isactive']))? redirect(‘welcome’): redirect(‘login’);
    }
    }
    ===========================================

    Thanks :)

  43. Lázaro says:

    The video if Offline. :(

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.