[GRADLE-988] Script based plugins are too slow Created: 17/Jun/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Steve Appling Assignee: Adam Murdoch
Resolution: Fixed Votes: 0


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.

Generated at Wed Jun 30 11:44:01 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.