Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2887

Avoid generating redundant logging code across modules

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.9.0.Beta1
    • Component/s: build, engine
    • Labels:
      None

      Description

      This is about a very minor improvement but interesting research in the JVM internals.

      It turns out that the code our annotation processor generates for all Loggers is - of course - quite a lot of code being generated as there are a couple of methods, constants and formatters for each possible error, warning and exceptions.

      What we missed is that by having our non-core modules inherit their Log interface from the one in hibernate-search-engine the generated code is duplicating all definitions from the main module, rather than similarly generating a logger implementation which inheirts from the main one.

      Beyond the reasons of JVM metadata, I also believe this "convenience" of inheriting from the same module is actually not a good idea for other reasons so I'll be splitting the logger of hibernate-search-engine into a parent contract meant to be shared across modules, vs one which is meant to be private for this unit of code.

        Attachments

          Activity

            People

            • Assignee:
              sanne Sanne Grinovero
              Reporter:
              sanne Sanne Grinovero
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: