Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-335

Metadata: Store metadata as an object of arrays instead of an array of objects

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Blocker
    • Resolution: Unresolved
    • 2.0
    • 2.0
    • Performance
    • None
    • 3.13

    Description

      The current design represents column metadata as an array of objects ([ColumnDefinitionObject, ...]).
      While convenient, this layout is suboptimal for performance-critical row parsing.

      Problems with array-of-objects

      • Each row access requires:
        • Python object dereferencing
        • Attribute lookups (col.type, col.flags, col.character_set, …)
      • Attribute access is dynamic and expensive in tight loops.
      • Poor cache locality: metadata for one column is scattered across multiple Python objects.
      • Prevents efficient use of precomputed conversion tables.

      Proposal: Replace this with a single ColumnsDefinitionObject holding parallel arrays:

      Benefits

      • Zero attribute lookups during row parsing
      • Enables precomputed converter tables indexed by column number
      • Improved cache locality and predictable memory access
      • Cleaner separation:
        • metadata preparation (once)
        • row decoding
      • Aligns naturally with binary protocol parsing and C-level optimizations

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              georg Georg Richter
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.