[Kotlin] Kotlin 의 숨겨진 비용 #3 [Kotlin] Kotlin 의 숨겨진 비용 #3 https://medium.com/@BladeCoder/exploring-kotlins-hidden-costs-part-3-3bf6e0dbf0a4 Delegated property -class Example{ var p: String by Delegate()} property 에 delegate 를 사용할 경우에 해당 delegate 는 operator function 인 getValue 와 setValue 를 구현해야 한다.해당 function 들은 object instance 와 property metadata 를 받는다. public final class Example{ @NonNull private final Delegate p$delegate =.. 2018. 1. 18. [Kotlin] Kotlin 의 숨겨진 비용 #2 [Kotlin] Kotlin 의 숨겨진 비용 #2 https://medium.com/@BladeCoder/exploring-kotlins-hidden-costs-part-2-324a4a50b70 Local functions -local function 의 limit 은 inline 으로 정의될 수 없다는 것 ( 글 쓴 당시까지는, 현재버전에서 꼭 체크해보라 ).그리고 local function 을 가지고 있는 녀석도 inline 이 될 수 없다.fun someMth(a: Int): Int { fun sumSquare(b: Int) = (a+b) * (a+b) return sumSquare(1) + sumSqaure(2)} local function 은 Function object 로 바뀐다.public .. 2018. 1. 17. [Kotlin] 장점, 단점, 그리고 아쉬운 점 이야기 [Kotlin] 장점, 단점, 그리고 아쉬운 점 이야기 https://medium.com/keepsafe-engineering/lessons-from-converting-an-app-to-100-kotlin-68984a05dcb6https://medium.com/keepsafe-engineering/kotlin-the-good-the-bad-and-the-ugly-bf5f09b87e6f -위 링크의 글을 쓴 필자는 마켓에 출시된 Java 로 되어 있는 앱을 Kotlin 으로 전환했다.많은 사람들이 Kotlin lib 때문에 dex method limit 이 걸릴 것을 걱정하지만,실제 converting 후 proguard 적용시 method count 는 10% 줄어들고, code line 은 30% 줄.. 2018. 1. 15. [android] Android Layout Tricks #4 : Optimize with stubs ( 성능 최적화 ) 출처 : 안드로이드 개발자 article Android LayoutTricks #1 (성능개선) Android Layout Tricks #2 : Reusing Layouts ( 성능개선 ) Android Layout Tricks #3 : Optimize by merging Window Backgrounds & UI Speed Android Layout Tricks #4 : Optimize with stubs * 원문에서는 Tricks #3 으로 제공되지만, 다른 article 과의 연관성을 고려하여 #4 로 명명하였다. - android 는 ViewStub 이라는 특별한 widget 을 제공한다. 이 녀석은 거의 쓰이지 않는 view 들에 대해 이점을 제공한다. - ViewStub 은 매우 가벼운 vie.. 2012. 11. 28. [android] Android Layout Tricks #3 : Optimize by merging 출처 : 안드로이드 개발자 article Android LayoutTricks #1 (성능개선) Android Layout Tricks #2 : Reusing Layouts ( 성능개선 ) Android Layout Tricks #4 : Optimize with stubs ( 성능 최적화 ) Window Backgrounds & UI Speed Android Layout Tricks #3 : Optimize by merging - 여기서는 태그에 대해 다룬다. - 태그는 view tree 의 level 을 줄여서 android layouting 을 최적화시킬 수 있다. - Title bar 가 있는 경우 기본 View tree 는 다음과 같이 구성된다. - 빨간박스가 Title bar 쪽이고 왼쪽 Fra.. 2012. 11. 28. 반응형 이전 1 다음