-
Notifications
You must be signed in to change notification settings - Fork 531
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
compilation time for record access depends on value types #486
Comments
Interesting! This ought to be the same issue as #420, but clearly isn't. |
I'm not seeing that with the latest 2.3.0-SNAPSHOT ... SBT incremental compile time for uncommenting each of those calls individually is a constant 2s on my (modest) machine. Could you give it another try? |
Yep, works great in 2.3.0-SNAPSHOT. 👍 |
Awesome ... thanks :-) |
This behavior persists when mapping, and becomes worse as the element types become fancier. Not sure if this is related/expected. // continued from above
object Two extends Poly1 {
implicit def all[A] = at[A](_ => 2)
}
r1.map(Two) // 0 sec
r2.map(Two) // 1 sec
r3.map(Two) // 5 sec |
It's related and expected. The fix in the selection case was to replace the implicit/inference based mechanism with a specialized macro which eliminated most of the typechecking overhead. It's possible that something similar would be possible for Would you mind creating a separate ticket for this ... I'll target it for shapeless 3.0. |
Following up on a Gitter conversation from a few days ago.
When accessing an element in a record the compilation time not only depends on the position of the element (as expected since you have to walk the list) but also on the type of the associated value.
The text was updated successfully, but these errors were encountered: