google / google/flogger

Caching of Context objects

Open
#302 2 comments 0 reactions 0 assignees View on GitHub
P4 type=enhancement
Dominant language
Java
Stars
1.5k
Forks
133
Avg merge
6m
Merged PRs (30d)
7

Description

Hi all,

I have been performing some performance testing within our application that utilises Flogger (log4j2 backend) as our logging framework.

I have found that when performing logging (arguably excessive number of log statements), Flogger starts showing up withing our profiler (we are using async-profiler).

Digging further into the Flogger implementation, it seems that the Context object is created upon every call to Flogger. Which called enough will become a drag on garbage collection.

Is there any possibility for this Context object to be cached and reused across multiple logging calls?

Thanks in advance!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.