Current logger implementation performance issues
GameTec-live opened this issue · 0 comments
As discussed before in discord, the current logger implementation is causing severe ish performance issues.
The current logger is a customized Logger with extra arguments (Logger(...)) which allows saving logs to shared preferences on release builds to allow for debugging purposes. This sadly also introduces a bug where the Logger doesnt disable itself correctly as this seems to be a compile time optimization. Therefore any communications with the Chameleon (wheter or not the logs are actually saved and wheter or not its a release build) are slowed down by ~ 1/2, because of the Logger trying to log every message. (~200ms Communicating, ~150ms spent logging)
The easy fix would be to just instanziate logger with no special arguments (Logger()) and get rid of production logging. This may make debugging issues harder, but on the other hand, it only has been used very rarely and i dont think that the few times it has been used, any majorly important information has been extracted from the provided log. Id say one should focus on reproducing the issue instead, so one can debug in a proper development enviroment.
Other possible solutions are welcome ofc.