Git Product home page Git Product logo

Comments (3)

runarorama avatar runarorama commented on July 17, 2024

We have done some preliminary benchmarking. Journal is really just a very thin wrapper around SLF4J.

Any difference is strictly because of the asynchronous nature of Journal. Journal has a dedicated thread consuming the log queue, so if all your CPUs are saturated this will actually be slower, not faster. Using SLF4J with AsyncAppender, you should be able to get exactly the same performance profile.

from journal.

runarorama avatar runarorama commented on July 17, 2024

In addition, the macros ensure that if you have a particular log level turned off, the logger calls will be completely removed from the compiled code. So e.g. your debug log statements will have no overhead in production.

from journal.

runarorama avatar runarorama commented on July 17, 2024

Published the latency benchmark in 7b8d45c

Running it on my laptop gives the following timings:

Journal:
  min: 14 ns
  max: 87724 ns
  avg: 49.300918 ns
SLF4J:
  min: 1243 ns
  max: 32737417 ns
  avg: 4592.998692 ns

So Journal reduces the latency of logging by roughly two orders of magnitude.

from journal.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.