Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-988

Script based plugins are too slow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9-rc-1

      Description

      We are using two different plugin scripts ( like apply from: plugin('plugin_script_name') which are called from inside our root project's allprojects closure. The plugin script objects are apparently re-loaded and re-instantiated for each project. This resulted in DefaultScriptCompilerFactory.loadViaCache being called over 150 times. The loadViaCache calls triggered by 'apply from:' totaled 5.6 seconds. In contrast, the 70 calls to load and run the Java plugin only took a total of .044 seconds. The non-script plugins use a hierarchy of PluginRegistry objects to look up the appropriate plugin instance and don't re-create them every time. The script based plugins need something like this if they are going to perform well.

        Attachments

          Activity

            People

            Assignee:
            adammurdoch Adam Murdoch
            Reporter:
            sappling Steve Appling
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: