Comments (12)
We just found out that adding diffx to one of our tests increased compile time from 9s to 37s. Most of the time spent in macro expansion and typer (magnolia?). So diffx is out for now...
from diffx.
Offtopic: @francisdb we are using https://github.com/gnieh/diffson for diffing json ast's and it's working very well for us
from diffx.
That's an interesting turn of events, as magnolia was supposed to help exactly with that problem ;) But maybe the code we're generating is somehow complex to typecheck?
from diffx.
some details on compiler perf for the module that got slowed down:
[info] time spent in implicits : 26298 spans, ()40685.324ms (97,1%)
[info] successful in scope : 4602 spans, ()34438.572ms (82,2%)
[info] failed in scope : 21696 spans, ()15615.766ms (37,3%)
[info] successful of type : 6005 spans, ()40204.231ms (96,0%)
[info] failed of type : 15691 spans, ()195.332ms (0,5%)
[info] assembling parts : 605 spans, ()2892.693ms (6,9%)
[info] matchesPT : 51482 spans, ()174.387ms (0,4%)
[info] time spent in macroExpand : 8636 spans, ()34019.755ms (81,2%)
the test has about 10 cases doing play json ast diffs
from diffx.
@francisdb Could you give some example of how big are your case classes?
from diffx.
Hmm, some quite elaborate play json JsObject object, maybe comparable to this https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/intro-to-tweet-json#quotetweet
(and using the workaround provided in #14 )
from diffx.
It would be great to have some benchmarks run on CI so we won't introduce regression after we fix it.
Here are some inspirations:
- https://github.com/scala/compiler-benchmark
- https://scalameter.github.io/
- https://github.com/propensive/magnolia/blob/master/benchmarks/2.12/benchmark
from diffx.
@francisdb are you maybe also using the silencer plugin? See ghik/silencer#45 why I suspect this might be connected :)
from diffx.
Nope, we were not using that plugin
from diffx.
Well, was worth a shot ;)
from diffx.
Hi, I know that it's been a while but finally I managed to fix it to certain degree. It turned out that switching from auto to semi-auto derivation drastically decreases compilation time, so from this time onward this will be the recommended way to use diffx.
from diffx.
Closing as semi-auto solves that problem.
from diffx.
Related Issues (20)
- create scalafix migration rule for latest change in scalatest
- Enable users to control `renderIdentical` parameter over the test Matchers HOT 5
- Add smart license check
- configure lsif
- Comparing JSON objects causes StackOverflowError
- Docs should require versions HOT 5
- provide nix-shell HOT 1
- resolve version conflict in HOT 1
- build on master not working HOT 1
- Setup mima
- setup versioning scheme
- Unable to `modify` nested case class HOT 9
- Returning `IdenticalValue` for a case class HOT 2
- `modify` creates a `Diff` that fails with a `ClassCastException` when using a set for comparison HOT 2
- Trailing whitespace is ignored
- Provide `Diff[Unit]`
- Scala 3 Auto Derivation doesn't seem to work
- Compare collection by single field using matchByValue HOT 9
- Objects with multi-line toString method are not rendered properly in diff results HOT 3
- Ignore structure inside Option field
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffx.