Queries in CI profiler

edited June 2011 in Bug Reports
I turned on the profiler in MY_Config.php, but the query section always shows 'No queries were run'.
I'm pretty sure many queries are executed though.
They do show up on a fresh CodeIgniter application, but not in Fuel.
Anyway to turn them on?

Comments

  • edited 9:48PM
    This happens because of around line 140-141 in fuel/application/core/MY_Model.php, we clone the DB object onto the model instead of just using the CI->db object. The reason for this was to prevent active record query issues across models. However, in most cases you may not need to clone it. If you remove those lines, you'll see the queries.

    We currently don't have a MY_Profiler fix for it, but if you come up with something, I'd love to know.
  • edited 9:48PM
    OK, thanks for the explanation!
    I'll take a look at it if I have some time left.
  • edited 9:48PM
    Tried to do something about it, hope it works:

    https://github.com/daylightstudio/FUEL-CMS/pull/95
  • edited 9:48PM
    nice , I was just about to dig into profiling , glad that someone did it !

    the only question I have is how should i output the profiling ? if using $this->_render , I can see the profiling output if I use the this->load->view.
  • edited 9:48PM
    Are you saying you are having issues viewing the output in the admin? $this->_render in Fuel_base_controller uses $this->load->view to render as well, it just loads the fuel_header and fuel_footer files as well.
  • edited 9:48PM
    mmmm more like if I have build adv module with custom controller , I won't be able to see the profiling info , even though I m extend from the Fuel_base_controller.
  • edited 9:48PM
    Where are you seeing this problem? If you view source, do you see the code (it may be hidden by how the CSS is setup)?
  • edited 9:48PM
    nope I don't see it on source , it happen for module which not routing to FUEL_FOLDER.'/module' , that's why i wonder am i missing something.
  • edited 9:48PM
    The profiling should be outputted automatically if you set the 'enable_profiler' value in MY_config. CI's Output class takes care of the output and isn't something specific to FUEL. FUEL has just set up a convenient post_controller hook in fuel/application/hooks/Fuel_hooks.php to take care of enabling it on the Output class.
Sign In or Register to comment.