Repository navigation
Open
Labels
Description
Follow-up to #4445 (perf audit, connections lane). Items left out of that PR:
- C4, read a table held behind another query on a new connection (D4 a, approved). Cut for size: needs a leave token on
SessionDriverGate, a pooled re-route with its refusal rules, a waiting state onTabExecutionState, UI inExecutingResultPaneandResultStatusReadoutView, strings and screenshots. Measured: a table open waits 8.05 s behindpg_sleep(8)in another tab, PostgreSQL and MySQL. - C5c, send queued PostgreSQL catalog reads as one Query. Cut: a read queue in
LibPQDriverCore(medium risk). Without it each side kind takes its own lease, no extra round trip on a serial connection. Plan: refresh 7 serial reads to 4 flights,refresh.rtt_depth9 to about 6,connect.rtt_depth13 to 11. - C5e, use the SSH probe channel for the first connection. Cut: needs the hand probe through the
pa-regsshd to MySQL withconnect_timeout = 2. Plan:handshake_rtts9 to 8, channel opens 4 to 3. - C11b, take the browsed scope's tree lists from the schema service. Cut for size. Plan:
tree_layout6 reads to at most 1 (PostgreSQL), 5 to 0 (MySQL). Also seen on the Mac mini: when the session redial after a dropped connection lands after the tree layout, the tree reads its lists again (12 to 13 statements on MySQL). - C15a, skip
USEon the current SQL Server database. Gated on a hand probe ofdbnameafterUSEinsideEXEC; no SQL Server on the measuring Macs. Plan: page 3 to 2 statements, run 3 to 2. - C15b, skip the transaction probe after consecutive table reads. Implemented, then cut after review: under MySQL
autocommit=0a MyISAM read answers idle and a following InnoDB read opens a transaction, so "idle after an idle table read" hides it. A sound version keys the skip by table, which needs the table name at thewithTableReadDrivercallers. Plan: SQL Server page 2 to 1 statements, probes 10 to 1. - C15c, ask SQL Server for schema and version together at connect. Implemented, then cut: SQL Server could not be measured.
SELECT SCHEMA_NAME(), @@VERSIONinMSSQLPlugin.connectwithMSSQLSessionIdentityand tests is in 56f6c31, in the history of perf(connections): read less of the catalog on connect, commit and database switch #4445. Plan: connect 37 to 34 statements. - C11a on MySQL and MariaDB: switching back to a database browsed a minute earlier still reads its whole catalog (13 statements before, 14 after on the Mac mini), while PostgreSQL went 13 to 6. An in-place switch (
DatabaseManager.switchDatabase, theplugin.switchDatabasebranch) never callsSchemaService.show(scope:type:), so the old database's catalog stays shown until the new load lands andkeepsShownCatalog()never sees the kept one. Showing the kept catalog on that branch, as the lane and reconnect paths do, fixes both. editor_commit_ddlbench (a COMMIT after CREATE TABLE keeps its refresh) is not in thedb-roundtripsdriver yet; unit tests pin it.
Activity