Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-58646

Time to reset caches (compile Boost) recently became 3x slower

    Details

    • Testing Instructions:
      Hide
      1. Use boost theme
      2. Purge caches
      3. VERIFY: css is recreated and moodle is styled
      4. Change a boost setting such as brand colour
      5. VERIFY: css is changed and the look of site has changed
      6. VERIFY Using curl or the web inspector, examine the time to compile the scss before and after the patch and that with the patch, peformance is dramatically improved.

      For example, using curl, you can use styles_debug to do this:

      curl -s -w "\nConnect time: %{time_connect} Time to first byte: %{time_starttransfer} Total time: %{time_total} \n" -o /dev/null 'http://[YOUMOODLE]/theme/styles_debug.php?theme=boost&type=scss'
      

      Ensure that css is flipped when in an RTL language

      Show
      Use boost theme Purge caches VERIFY: css is recreated and moodle is styled Change a boost setting such as brand colour VERIFY: css is changed and the look of site has changed VERIFY Using curl or the web inspector, examine the time to compile the scss before and after the patch and that with the patch, peformance is dramatically improved. For example, using curl, you can use styles_debug to do this: curl -s -w "\nConnect time: %{time_connect} Time to first byte : %{time_starttransfer} Total time: %{time_total} \n" -o /dev/ null 'http: //[YOUMOODLE]/theme/styles_debug.php?theme=boost&type=scss' Ensure that css is flipped when in an RTL language
    • Workaround:
      Hide
      1. Edit /theme/boost/scss/moodle.scss
      2. Move the following lines at the END of the file
        // Import font awesome.
        @import "fontawesome/moodle-path";
        @import "fontawesome/font-awesome";
        
      3. Save and done.

      On my system, the compile goes from taking about 16s, to 7.5s.

      Show
      Edit /theme/boost/scss/moodle.scss Move the following lines at the END of the file // Import font awesome. @import "fontawesome/moodle-path"; @import "fontawesome/font-awesome"; Save and done. On my system, the compile goes from taking about 16s, to 7.5s.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull 3.2 Branch:
    • Pull 3.3 Branch:
    • Pull Master Branch:
      MDL-58646-master

      Description

      Based on some comments from David Mudrák in the dev chat, that I also had recently experienced... I did conduct this quick test using a 1-step feature:

      Feature: Simple feature
       
        @javascript
        Scenario: Simple feature
          Then I should see "test"
      

      running it against 32_STABLE, some weeks old master and current master... and it seems obvious that something has changed recently, making it really slower (30 seconds vs > 90 seconds in same installation:

      https://pastebin.com/K7wVci9f

      Worth checking what's going there. Specially in case if affects normal execution too.

      Ciao

        Gliffy Diagrams

          Attachments

          1. image-2017-05-31-17-18-04-983.png
            206 kB
            Brendan Heywood
          2. moodle.css.after.png
            39 kB
            Frédéric Massart
          3. moodle.css.before.png
            39 kB
            Frédéric Massart

            Issue Links

              Activity

                People

                • Votes:
                  24 Vote for this issue
                  Watchers:
                  38 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Jul/17