Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task configuration avoidance is defeated by IDEA import/sync #7633

Open
ldaley opened this issue Nov 5, 2018 · 13 comments
Open

Task configuration avoidance is defeated by IDEA import/sync #7633

ldaley opened this issue Nov 5, 2018 · 13 comments
Labels
a:performance-improvement Performance improvement potential in:tooling-api

Comments

@ldaley
Copy link
Member

ldaley commented Nov 5, 2018

When importing/syncing a build in IDEA. all tasks are realized. This means that if one is using the configuration avoidance constructs to avoid expensive configuration (e.g. IO) unless the task is needed, this slows down the IDE sync. This reduces the “reliability” of configuration avoidance for avoiding expensive configuration.

Ideally, IDE sync wouldn't need to realise all of the tasks and the existing constructs would just work. Failing that, more targeted constructs may be necessary, or falling back to existing informal constructs such as configuration tasks or taskGraph.whenReady deferrals.

@oehme
Copy link
Contributor

oehme commented Nov 5, 2018

I think this is more of an issue on the idea side. Idea needs all tasks to populate the tasks view, including groups and descriptions. However this is not needed for the basic function of editing your project. So it could fetch the information for the tasks view later.

@big-guy
Copy link
Member

big-guy commented Nov 5, 2018

It's on both sides. To build the GradleProject model, we realize all the tasks and there's not a way to say you don't need that information and GradleProject is attached to all of the IDE models. We could maybe replace this with a "lite" GradleProject

@oehme
Copy link
Contributor

oehme commented Nov 6, 2018

I see, we should deprecate that and only leave ProjectIdentifier in place.

@technoir42
Copy link

I stumbled upon this issue after migrating all the plugins in our project to support configuration avoidance. Was that work all for naught? The performance of IDE sync was the main reason we invested in moving to the new task APIs.

The problem can be easily reproduced by adding a task like this to any project:

tasks.register("unusedTask") {
    throw new GradleException("Should not be configured")
}

@stale
Copy link

stale bot commented Dec 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Dec 3, 2020
@technoir42
Copy link

Still relevant.

@stale
Copy link

stale bot commented Apr 19, 2022

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Apr 19, 2022
@abbas-gadhia
Copy link

The problem mentioned by @technoir42 still exists in Intellij 2021.2.1
We wanted to improve our IDE sync times but looks like this issue is a blocker for that

@stale stale bot removed the stale label May 27, 2022
@leni8ec
Copy link

leni8ec commented Jul 6, 2022

I also experienced this problem - are there any plans to fix it? If it is a problem on the Intellij IDEA side, where can I report it?

Task configuration avoidance by tasks.register() is ignored on 'Gradle Reload' event in Intellij IDEA (or Android Studio)

It's also confusing that right before this, the task: prepareKotlinBuildScriptModel is called - because I thought that it was the cause. But it has no relation to this, you can check this - by disabling the 'Kotlin' plugin in IntellijIDEA

Mention of this problem: link

image

@nikitasius
Copy link

annoying kotlin shit in my java project

@xtracoder
Copy link

Not sure, maybe disabling "Kotlin" plugin in IDEA will help

@daymxn
Copy link

daymxn commented May 1, 2023

+1

We're having this issue over at Google as well.

@gleb-skobinsky
Copy link

Same issue, still relevant in Intellij 2023.2.1

@ov7a ov7a added the a:performance-improvement Performance improvement potential label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:performance-improvement Performance improvement potential in:tooling-api
Projects
None yet
Development

No branches or pull requests