Open liutikas opened 1 year ago
We hit it in our own plug in as well
Thank you for your interest in Gradle!
This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.
This feature request is in the backlog of the relevant team and is prioritized by them.
We probably cannot make the call itself lazy at this point, and we'll have to add some other way to enumerate properties if we decide to deprecate it.
Isolated projects may also influence the shape of the solution, as the current API might be problematic there.
Expected Behavior
Gradle should deprecated or at least warn developers that Project.getProperties() is a non-lazy, and that they likely want to call hasProperty/getProperty.
Current Behavior (optional)
Calling
Project.getProperties()
is quite expensive and can trigger going through all the properties unnecessarily, for example see https://youtrack.jetbrains.com/issue/KT-56421 / https://github.com/JetBrains/kotlin/commit/0ab8d07 that was causing 300ms in our configuration time since it was called a lot.Context
It is a constant cause for papercut performance issues across the plugin ecosystem.