zsmb13 / MaterialDrawerKt

A Kotlin DSL wrapper around the mikepenz/MaterialDrawer library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline lambdas

zsmb13 opened this issue · comments

This is an improvement that will have to wait until Kotlin 1.2 becomes stable, since we need default arguments for function types in inline methods, which is supposed to ship with that release.

Some implementation notes for later:

  • Make sure to measure performance difference of current vs inlined lambdas in the builders
  • Use the PublishedAPI annotation to keep currently internal methods internal

Kotlin 1.2 is out now, I'm planning to evaluate whether this has a real performance benefit later - this testing is currently planned for January.

Did not find a measurable time or memory benefit to inlining the lambdas. The feature is complete on a separate branch, but will not be merged for the time being.