You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On current log4js version (v6.7.0), I've noticed a potential performance enhancement on PatternLayouts :
This while code block seems to be underachieving the pattern processing, in the way it's applying the regular expression as many times as they are log events.
Is it possible to find a way to have this regular expression applied only once, and have a function return after its processing, that itself would directly produce the awaited formatedString ?
Hi
On current log4js version (v6.7.0), I've noticed a potential performance enhancement on PatternLayouts :
This
while
code block seems to be underachieving the pattern processing, in the way it's applying the regular expression as many times as they are log events.Is it possible to find a way to have this regular expression applied only once, and have a function return after its processing, that itself would directly produce the awaited formatedString ?
For exemple, turning the following pattern :
|%[{blue}%r|%[%p|%[{yellow}%c|%]%m|
into the following function :
Disclaimer : I'm not certain that what I'm proposing here would enhance performances in any way, it's juste an idea 😉
The text was updated successfully, but these errors were encountered: