svelte-native icon indicating copy to clipboard operation
svelte-native copied to clipboard

use N trace

Open farfromrefug opened this issue 4 years ago • 2 comments

I know you did not make a choice on this but. went ahead and made the PR. I do see some perf improvements when i can "remove" all the loggings in production

farfromrefug avatar Feb 20 '21 14:02 farfromrefug

I would prefer basicdom to have no knowledge of nativescript, hence the logger injection. We could use the logger's enabled property instead, but I am having trouble seeing a perf improvement (or even significant difference) over what is there now

https://jsben.ch/htd3K

halfnelson avatar Apr 25 '21 03:04 halfnelson

@halfnelson the perf comes from removing "all logs" through tree shaking. Right now with your debug system it really hard to do so. If you dont want basicdom to have any knowledge of N i can simply import and export Trace inside Logger.

I also think it would be great for all N community to handle logs the same way. At the end we as N could provide an official way to remove all logs in prod which when you do it for all plugins + core makes a difference (code size but also a lot less if tests method calls).

farfromrefug avatar Apr 26 '21 12:04 farfromrefug