question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Task Takes Too Long

See original GitHub issue

I’ve been using this tool a long time now. And I’ve noticed that it now takes really long time to check dependencies. I haven’t run this tool for a while now, but today took 4 hours to complete the task

Generated report file build/dependencyUpdates/report.txt

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 4h 11m 4s

Am I missing a flag or configuration? Thanks

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:25 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
ldimitroffcommented, Aug 19, 2021

@ben-manes @henrik242 I’ve fixed locally the issue by removing a snapshot repository before running the dependency updates task. Noticed that the task was trying to get the information about every verion listed in that repository. It was going decremental instead of checkging the latest version 🤷‍♂️

tasks.dependencyUpdates.doFirst {
    project.repositories.removeAll {
        it instanceof MavenArtifactRepository && it.url.toString() == '<MY.SNAPSHOT.REPO>'
    }
}
2reactions
ben-manescommented, Aug 19, 2021

Would it be possible to log some statistics of the most time consuming tasks/repositories/artifacts?

@henrik242 Unfortunately we can’t, because the resolution is handled by Gradle itself. We don’t reimplement their dependency management, but plug into it via a cloned configuration and rewritten dependency versions. Since the APIs don’t expose that data, we couldn’t provide hints beyond looking at the --info or --debug logs to see Gradle’s messaging.

Noticed that the task was trying to get the information about every version listed in that repository. It was going decremental instead of checking the latest version

@ldimitroff This is how a resolution strategy works to resolve, where it pulls all of the versions (typically from maven-metadata.xml), orders in descending order, and then filters by the component selection rule until a version passes (or fails as unresolvable). If Gradle is making a fetch per version then that would be slow. It may be that if you declare the repository as snapshot only, gradle might skip over it. However, since we use a dynamic query (+) it might try regardless so your trick is excellent.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What to do when tasks take longer than you expected
To start: break your project down into smaller well-defined parts. Estimate how much time each task will take. Then give yourself a certain ......
Read more >
Why is it that I take forever to finish tasks? - Quora
Even if you're an organized person, you may have too many tasks in your hands. This situation, if improperly handled, can lead to...
Read more >
10 Reasons Why Tasks Take Too Long | SimonStapleton.com
Tasks take too long because they are too badly defined. Too little information to know how to start, process or end. Too little...
Read more >
Why tasks take a long time to complete - IBM
The most obvious factor affecting the time taken for a task to complete is system loading. For more information, see Improving the performance ......
Read more >
Why does it take you so long to finish a task?
Solving a task or reading an article from a magazine takes usually no more than a few minutes. Meanwhile, the chances to be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found