Yes you should definitely call it once and keep the instance around in your companion object. But for that one call it also is very fast although the method names sound expensive.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Best practices for loggers
|
27 | 122835 | July 11, 2023 | |
Top-level packageName | 8 | 1185 | July 19, 2023 | |
Logger declaration
|
5 | 2354 | January 2, 2017 | |
MyClass.class syntax in Kotlin
|
14 | 77305 | December 4, 2017 | |
Is there anything like C# Caller Information in Kotlin? | 5 | 1019 | February 5, 2019 |