hughsimpson / RakuFHIR

A FHIR (v4.0.1) domain model and client implementation for Raku (née Perl6), with json serdes
2 stars 0 forks source link

Serdes are slow #4

Open hughsimpson opened 3 years ago

hughsimpson commented 3 years ago

Really we shouldn't have any problems decoding and re-encoding the FHIR definitions in like a second, but it takes ages.

alabamenhu commented 3 years ago

Glancing over the code base a few things jump out at me:

    my constant %when = 
        a => { … }, 
        b => { … };

    with %when{$given} { .()         }
    else               { #`[default] }
hughsimpson commented 3 years ago

Yeah the current mixins are an obvious candidate for performance improvements. I don't think the givens are even showing up yet, performance-wise, TBQH. I haven't had the time to revise this really, it was just a little test for some code-generation work that I decided to pretty-up enough to be technically usable, I don't use Raku in my day-to-day and don't know the language awfully well