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.

toService with Circe takes forever to compile for large Coproducts

See original GitHub issue

Looks like valueToResponse might send the compiler on a wild goose chase to look for Encoder instances at each step of the Coproduct induction, but we never really want to do that! I.e. Encoder instance of the Coproduct tails.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11

github_iconTop GitHub Comments

1reaction
joroKr21commented, Nov 27, 2019

Right, sorry I forgot to reply to your previous message, I guess you figured it out but the json method is one we have in our codebase at work, not coming from Finch.

1reaction
zhenwenccommented, Nov 27, 2019

To follow up the problem I posted above, after refactoring the code to use coproduct as suggested by joroKr21, the improvement is very very significant!

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does C++ compilation take so long? - Stack Overflow
Compiling a C++ file takes a very long time when compared to C# and Java. It takes significantly longer to compile a C++...
Read more >
Cookbook - Finch - Finagle
toService compile error. Finch promotes a type-full functional programming style, where an API server is represented as a coproduct of all the possible...
Read more >
[BUG] Awfully slow compilation of a source file with a ... - GitHub
The problem seems to happen because of a big globally-initialized array, which has around 390 entries. If I edit file src/table/settings.h and ...
Read more >
Extremely Long Compile Times - Forum - One Identity
I'm using version 7.1.1 and I'm seeing some extremely long compile times when ... It's taking upwards of an hour where before it...
Read more >
FAQ: Speeding up slow build times - Documents - EngineerZone
Q: I'm encountering slow build times with the tools. ... Large array initialisers can take a long time to parse (this is particularly...
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