[issue44079] [sqlite3] optimisation: remove statement weak ref list from connection object

2021-05-08 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +24651 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25998 ___ Python tracker __

[issue44079] [sqlite3] optimisation: remove statement weak ref list from connection object

2021-05-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Berker/Serhiy, weak ref. list question: Could also the pysqlite_Statement.in_weakreflist member go? Seems to be ok: $ git diff --shortstat 3 files changed, 13 insertions(+), 72 deletions(-) $ ./python.exe -m test -R : test_sqlite 0:00:00 load avg: 0.83 Run

[issue44079] [sqlite3] optimisation: remove statement weak ref list from connection object

2021-05-08 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Today, the sqlite3 extension module keeps two[1] lists of statements: 1. The statement cache[2], stored in pysqlite_Connection.statement_cache 2. A weak ref. list (hard coded limited to 200 statements in _pysqlite_drop_unused_statement_references()), s