Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-35498

InnoDB logger class causes significant code bloat

    XMLWordPrintable

Details

    Description

      As noted in MDEV-22721, the ib::logger classes and its subclasses cause a lot of code bloat. Some of it was addressed back then. One example, just observed in a recent 10.6 build, that there are hundreds of inline copies of the constructor ib::error::error().

      The original motivation of implementing this bloat was to work around MDEV-21978 and the lack of an printf function attribute by avoiding the use of any printf style functions altogether. The C++ style operator<<() misuse translates into multiple function calls, which is extremely inefficient.

      We should really replace most occurrences of ib::info(), ib::error(), and ib::warn() with direct calls to sql_print_information(), sql_print_error(), and sql_print_warning(). Where it is not possible (say, due to MDEV-27158), we’d better declare and define the constructors and destructors ATTRIBUTE_COLD ATTRIBUTE_NOINLINE, so that the code bloat will be reduced.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.