Skip to content

perf(postgresql): skip second string convert after typed PG cell encoding #874

Description

@ZhuchkaTriplesix

Summary

Postgres Table Browser and SQL workspace already convert cells with convertPostgresResultRowsToStrings (OID / udt_name literals). They then pass that List<List<String>> into convertResultRowsToStringsAdaptive, which walks every cell again (internObject / toString) and, at ≥1000 rows, copies the whole matrix to an isolate.

That second pass cannot recover PG types (already strings). Cost is O(R×C) twice on first paint of a capped SELECT (default 5000).

Scope

  • Return the typed conversion result (optionally intern in that pass).
  • Do not call convertResultRowsToStringsAdaptive on already-string PG rows.
  • Cover SQL workspace + Table Browser (_postgresRowsToDisplayStrings).

Out of scope

  • MySQL/SQLite convert paths (they are not double-typed).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend database driver execution and queriesdata-gridInteractive data grid, cell editor, filtering, groupingsperformanceTheme parser epic label: performance

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions