idisfkj / android-startup

🔥The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.
https://rousetime.com
Apache License 2.0
1.6k stars 158 forks source link

Remove Logging from library #27

Closed kuFEAR closed 2 years ago

kuFEAR commented 2 years ago

Hi, for better performance of your library will be better to delete all of logging code, because it spends time and allocates a lot of objects, and also it uses reflection api for getting class name and etc, usually this does lazily putting arguments and formatted/concatenated on demand. LoggerLevel settings nohow to helps here, because message will creates even with LoggerLevel.NONE for example:

StartupLogUtils.d("${startup::class.java.simpleName} being dispatching, onMainThread ${startup.callCreateOnMainThread()}.")

and somewhere I saw buildString with huge tables)

idisfkj commented 2 years ago

Yes, you are right. But I won't delete the logging code because it's useful for development debugging.

However, I will modify the log output mode to solve this problem.

Thank you ~

idisfkj commented 2 years ago

It has been updated in version 1.1.0, details