Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-3382

ByteStream performance

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 1.0.0
    • Icebox
    • Build
    • None

    Description

      messageqcpp::ByteStream was refactored and it was identified to have some inefficiencies. In the prior version it had a constructor and assignment operator that accepted shared_ptr<ByteStream> . This resulted in a lot of compiler implicit copies which arent immediately obvious. For example:

      ByteStream ClientRotator::read(){
      mutex::scoped_lock lk(fClientLock);
      ByteStream bs;
      if (!fClient)
      connect();
      try
      {
      bs = fClient->read();
      return bs;

      here fClient->read() returns a shared_ptr<ByteStream> where a temporary ByteStream is copied into then the temporary is assigned to bs. If RVO weren't performed a third copy would get returned to the caller. A better option here is for ClientRotator::read() to return shared_ptr<ByteStream> and avoid the copies. It's unclear where or how many of these are in the code base. Upon first look liboamcpp.cpp has a lot of inefficiencies. All usage should be investigated.

      Attachments

        Activity

          People

            Unassigned Unassigned
            david.mott@mariadb.com David Mott (Inactive)
            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.