Antonio,
I can confirm that, with this example, the contract generation code we
identified as a possible culprit is indeed the problem.
For reference, here are a few data points.
| # of union members | time in problem code | total time |
+--------------------+----------------------+------------+
| 1 | 1712 | 6820 |
| 2 | 2073 | 7421 |
| 3 | 2030 | 7745 |
| 4 | 2188 | 7335 |
| 24 | 11174 | 23656 |
| 25 | 9824 | 20024 |
| 30 | 17879 | 36099 |
| 32 | 42412 | 63279 |
| 39 | killed after ~12 minutes |
Pass 1 of the typechecker is the only other significant time
contributor, as was the case in the earlier, simpler example.
After around 30 union members, the calls to `change-provide-fixups`
begin to dominate.
Sam: You wrote `change-provide-fixups`, and left this helpful comment:
;; TODO: These are probably all in a specific place, which could avoid
;; the big traversal
This sounds like a potential solution. Can you elaborate?
Vincent
On Thu, 10 Sep 2015 17:41:00 -0500,
Antonio Leitao wrote:
>
> On Thu, Sep 10, 2015 at 10:57 PM, Vincent St-Amour
> <[email protected]> wrote:
>
> Antonio,
>
> That's weird. With that example, I do see the timings you mentioned,
> but
> if I turn on TR's timing logging, I see that almost all the time is
> being spent in pass 1 of the typecheck. I.e., in a different place
> than
> your original example, way earlier in the TR implementation.
>
> That makes me suspect that this new example exhibits a different
> issue,
> which is less likely to be related to the original bug you reported.
>
>
> OK. Attached is another example that is almost like the real code.
>
> Near the top of the file, you will see the Base-Shape type, with some
> stuff inside a block comment. Even as it is, with only one type in the
> union, it already takes a very long time to process. But as you
> uncomment more and more types in that union it becomes really, really
> slow. I'm afraid you will not be able to uncomment everything.
--
You received this message because you are subscribed to the Google Groups
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-dev/m2egi4byoh.wl-stamourv%40eecs.northwestern.edu.
For more options, visit https://groups.google.com/d/optout.