gjbarnard / moodle-format_grid

Grid course format contributed by Gareth J Barnard originally created by Paul Krix
GNU General Public License v3.0
21 stars 55 forks source link

Grid format and performance/ blackfire.io #14

Closed danbuntu closed 9 years ago

danbuntu commented 9 years ago

grid-format-blackfire Hello

I've recently been playing with blackfire.io and noticed that on a moodel course that uses the grid format that black fire shows a significant part of the loading times is becuase of grid format. I wonder if this info was relevant and perhaps something that could be looked into.

Please see the attached image that a page load on one of my sample courses where the grid format takes 42% of the load time, in particular the make_block_icon_topics function

gjb2048 commented 9 years ago

Thanks for the info. The chart shows the 'print_r' function taking 26...%. That will only happen when debugging is turned on.

Sent from my iPod in deep space...

On 27 Apr 2015, at 13:31, danbuntu notifications@github.com wrote:

Hello

I've recently been playing with blackfire.io and noticed that on a moodel course that uses the grid format that black fire shows a significant part of the loading times is becuase of grid format. I wonder if this info was relevant and perhaps something that could be looked into.

Please see the attached image that a page load on one of my sample courses where the grid format takes 42% of the load time, in particular the make_block_icon_topics function

— Reply to this email directly or view it on GitHub.

gjb2048 commented 9 years ago

P.s Please could you provide the steps I need to take to replicate this, then I'll be able to verify that any changes I make actually improve things.

Sent from my iPod in deep space...

On 27 Apr 2015, at 13:31, danbuntu notifications@github.com wrote:

Hello

I've recently been playing with blackfire.io and noticed that on a moodel course that uses the grid format that black fire shows a significant part of the loading times is becuase of grid format. I wonder if this info was relevant and perhaps something that could be looked into.

Please see the attached image that a page load on one of my sample courses where the grid format takes 42% of the load time, in particular the make_block_icon_topics function

— Reply to this email directly or view it on GitHub.

danbuntu commented 9 years ago

I've just checked this on my live system as well and I get the same results.

Moodle debugging is turned off on this system and display_errors set to off in php.ini. I've also doubled checked debug isn't on in my config.php

My setup is:

ubuntu 14.04 moodle 2.7.5 grid format 2.7.2

into that I've installed blackfire as per the instructions as at blackfire.io

gjb2048 commented 9 years ago

Ta. V2.7.2.1 is the latest for M2.7 to check against.

gjb2048 commented 9 years ago

Odd: https://github.com/gjb2048/moodle-format_grid/blob/MOODLE_28/lib.php#L1291-L1295

danbuntu commented 9 years ago

yes I noticed that.

I've just re-run the blackfire tests on my live system and I'm not getting the print_r section. I am still seeing a good part of the course load times coming from the grid format though.

I tried to screenshot it but it's a right spiders web :-)

gjb2048 commented 9 years ago

So, any specific place you think it could be improved?

danbuntu commented 9 years ago

course_section_cm seems to account for 23% of the load time according to blackfire so possibly that one.

gjb2048 commented 9 years ago

That's a core API method.

danbuntu commented 9 years ago

Lets close this and

danbuntu commented 9 years ago

Lets close this then and i'll re-open if I come up with some thing more concrete at some point

gjb2048 commented 9 years ago

Ok.