Don't use synchronized delegates
aafanasev opened this issue · comments
Now generated code looks like this:
private val adapter by lazy { gson.getAdapter(...) }
Since the evaluation of the delegated properties is synchronized and it's redundant in TypeAdapter case, need to use LazyThreadSafetyMode.NONE
mode, which doesn't incur any thread-safety guarantees and the related overhead.