https://kotlinlang.org logo
#http4k
Title
# http4k
r

Razvan

10/31/2020, 9:26 AM
Hi, I read that using contract routes can have some slight impact on performances, so I was wondering if I should keep the contract routes with no renderer for environnements where I don’t want to have the swagger specifications (production) or is it better to build a standard route in that case ? Thanks
d

dave

10/31/2020, 9:59 AM
It's not the renderer that would be the inefficiency, it would be the preextraction, which you could change, but it may change the semantics of your service behaviour so you shouldn't switch based on env. But but but - please don't optimise prematurely. Generally, trying to second guess the JVM (which is a marvelous creation which optimises warm performance in a bunch of clever ways) is a fools game. I don't know your usecase, but I doubt that you've got a problem which requires this type of streamlining, and there are many other things that can impact performance way over and above slight tweaks in anything but the most simple of services.
😍 1
r

Razvan

10/31/2020, 12:40 PM
Thanks, it was just a wonder after reading that remark that contacts have a slight impact, is true that our apis are not in need of that low level optimisation… Thanks