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?
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.
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.
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.
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.
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.
Comments
We currently don't have a MY_Profiler fix for it, but if you come up with something, I'd love to know.
I'll take a look at it if I have some time left.
https://github.com/daylightstudio/FUEL-CMS/pull/95
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.