Giter Site home page Giter Site logo

Comments (12)

francisdb avatar francisdb commented on August 20, 2024 1

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.

GMadorell avatar GMadorell commented on August 20, 2024 1

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.

adamw avatar adamw commented on August 20, 2024

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.

francisdb avatar francisdb commented on August 20, 2024

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.

ghostbuster91 avatar ghostbuster91 commented on August 20, 2024

@francisdb Could you give some example of how big are your case classes?

from diffx.

francisdb avatar francisdb commented on August 20, 2024

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.

ghostbuster91 avatar ghostbuster91 commented on August 20, 2024

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:

from diffx.

adamw avatar adamw commented on August 20, 2024

@francisdb are you maybe also using the silencer plugin? See ghik/silencer#45 why I suspect this might be connected :)

from diffx.

francisdb avatar francisdb commented on August 20, 2024

Nope, we were not using that plugin

from diffx.

adamw avatar adamw commented on August 20, 2024

Well, was worth a shot ;)

from diffx.

ghostbuster91 avatar ghostbuster91 commented on August 20, 2024

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.

ghostbuster91 avatar ghostbuster91 commented on August 20, 2024

Closing as semi-auto solves that problem.

from diffx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.