• Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core API
    • Labels:


      Could sl4fj provide an interface that enables avoiding all object allocation?

      This is important for low latency applications, which only allocate objects at startup, in order to prevent even minor collection pauses.

      The actual zero-garbage implementation could come later. It would be nice if the slf4j api itself did not have any such impediments. So e.g. users could pass some preallocated string-like object which implements CharSequence, instead of a concrete String, which cannot be allocated ahead of time. There could also be overloaded methods for relatively few parameters (say up to ten), for users that want to avoid the array allocation involved in the java variable argument feature. Of course it'd be positive to have logback implementation so that those actually work, even if they initially work with allocations.

      For the sake of backwards compatibility, this could be a new java interface. Perhaps a superinterface with the varargs replacements as default methods, to avoid breaking anybody who might be implementing the original interface.




            • Assignee:
              slf4j-dev SLF4J developers list
              foofar Foo Far
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: