-
Notifications
You must be signed in to change notification settings - Fork 697
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
Turn on --reorder-goals by default #1780
Comments
/cc @kosmikus |
Michael's description of the tradeoffs of |
Have you run benchmarks on this? I said that I am in principle ok with I don't have my old numbers, but I certainly had a reason that I originally |
@kosmikus
The slow-down seems to be acceptable overall except in the case of yesod. |
While I'm concerned about the fact that yesod takes such a longer time to get started, I still prefer that situation to the one where average users just get a confusing error message. IMO we should open up a separate issue to investigate why the solver is so slow on yesod with --reorder-goals, especially since (at least I believe) yesod is working with all the newest versions of its dependencies, which tends to be the simplest case to solve. |
I've noticed considerable slowdown because of this. I timed this with Current Cabal master: All dependencies were are already installed, the output of dry run (in both cases) is just
|
If the majority of users are opposed, we can always revert this change. |
I don't see any speedups in any of the benchmarks, so the speedup in some cases (like @snoyberg says in the first paragraph) doesn't seem to happen. If the problem is that some plans don't find a solution with the current defaults, wouldn't raising the default for 'max-backjumps' be a better fix? On our build server has it set to 8000, which might be a bit extreme as a default, but the current 200 is pretty low. |
Let's clarify the situation a bit: So it's entirely possible that while on average, time consumption goes up quite a bit, there are situations where The extra analysis performed by Given the numbers @23Skidoo has posted (and also my own measurements), I do think that for the time being, having |
To be clear, as the original requester, I don't want this change to go through if it significantly impairs normal usage of cabal. If --reorder-goals can be improved and the performance brought closer to the current default, I'd be very happy. But I can continue telling users to try out Which makes me wonder: would it make sense to instead of turning on |
@snoyberg There are currently two types of failure. One is that there's really no solution being found. In this case the solver prints The other is that the backjump limit is being reached. In this case, the solver prints @hesselink @23Skidoo BTW, the current limit of |
As suggested by Anders Löh in #1780.
I've reverted this change and also set |
Do we want to ship this fix in the next 1.20 bugfix release? On Tue, Apr 22, 2014 at 3:17 PM, Mikhail Glushenkov <
|
The |
I guess we should cherry-pick -x the --reorder-goals one though, as it On Tue, Apr 22, 2014 at 3:43 PM, Mikhail Glushenkov <
|
This change wasn't in 1.20, so no need to revert it. |
Notice the --reorder-goals switch in cabal install. More information about it can be found at: haskell/cabal#1780.
is this no longer planned? i was unable to build yi without this option |
--reorder-goals still makes each step significantly slower, so I think that the reasons for not making it the default still apply. The solution that @snoyberg suggested in #1780 (comment) could work, though. I created a separate issue for it: #4776 It's also possible that there is a bug causing the solver to not find a solution more quickly without --reorder-goals. Do you want to open an issue for the yi build? |
The last time the max-backjumps was increased was back in 2014 (see 0229cd5) as suggested per haskell#1780, and while `--reorder-goals` might often help as well, it also often comes at a bigger runtime penalty on average than doubling the max-backjumps. This should also address issues such as haskell#5882
Given that this ticket is linked to from the user guide, let me warn that |
I'll admit that I don't understand exactly what --reorder-goals does under the surface. It was basically explained to me as a feature that makes complicated build plans get resolved more quickly, but slows down simpler build plans. Apologies if that's completely incorrect.
In any event, I've recently needed to update the Yesod installation guide to include
--reorder-goals
, as it drastically cuts down on the number of times cabal fails to find a valid build plan. Is there a reason not to have this feature on by default? If it's just to speed up simple build plans, I'd argue that those are probably fast enough already.The text was updated successfully, but these errors were encountered: