XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.7
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide
      1. Use clean, and set theme designer mode to enabled
      2. Set define('THEME_DESIGNER_CACHE_LIFETIME', 1); in your config file
      3. Purge the cache (via CLI)
      4. Load a page, and observe that the styles are loaded slowly in styles_debug.php.
      5. Now reload the page, and make sure the styles are loaded fast, repeat several times
      6. One at a time, make some changes to one of the following, and make sure the styles are recompiled, and after one compile it loads quickly
        • CSS file in a plugin
        • Theme CSS file
        • Theme LESS file
      Show
      Use clean, and set theme designer mode to enabled Set define('THEME_DESIGNER_CACHE_LIFETIME', 1); in your config file Purge the cache (via CLI) Load a page, and observe that the styles are loaded slowly in styles_debug.php. Now reload the page, and make sure the styles are loaded fast, repeat several times One at a time, make some changes to one of the following, and make sure the styles are recompiled, and after one compile it loads quickly CSS file in a plugin Theme CSS file Theme LESS file
    • Affected Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-44453-master
    • Sprint:
      FRONTEND Sprint 11

      Description

      When themedesignermode is enabled and the theme is using a LESS file, the compilation takes a very long time (about 10s). We should try to set up some cache to only compile whenever necessary.

      Ways to solve that:

      • Look into the caching built-in less.php
      • Extend less.php to implement our own caching
      • Hash the CSS/LESS files and the dynamic content (callbacks) and check if it has changed, if not return the previous result.
      • ...

      PS: I lost the issue I thought I had raised, so re-raising this.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fred Frédéric Massart
              Reporter:
              fred Frédéric Massart
              Participants:
              Component watchers:
              Bas Brands
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: