playframework / play-json

The Play JSON library
Apache License 2.0
361 stars 134 forks source link

Make sure JSON macro performance is reasonable #68

Open gmethvin opened 7 years ago

gmethvin commented 7 years ago

The way we construct the Writes implementations with the JSON macros is not particularly efficient, as I have noticed in a few real-world apps. We should devise some tests to determine how much a performance impact there is versus manually constructing the object, and see where we can improve.

marcospereira commented 7 years ago

I wonder if it is better to have a test here or in prune.

Maybe prune is a better place since we can track the performance evolution in a scenario more close to the real apps.

What do you think?

gmethvin commented 7 years ago

We can add tests to prune but I think microbenchmarks are the best idea to track perf of individual features.