Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync2: dbset: use single connection for each sync session #6446

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Commits on Nov 11, 2024

  1. sql: add Database.Connection/WithConnection, interface cleanup

    This adds a possibility to take a connection from the pool to use it
    via the Executor interface, and return it later when it's no longer
    needed. This avoids connection pool overhead in cases when a lot of
    quries need to be made, but the use of read transactions is not
    needed.
    
    Using read transactions instead of simple connections has the side
    effect of blocking WAL checkpoints.
    ivan4th committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    ca2d5c6 View commit details
    Browse the repository at this point in the history
  2. sync2: dbset: use single connection for each sync session

    Using single connection for multiple SQL queries which are executed
    during sync avoids noticeable overhead due to SQLite connection pool
    delays.
    
    Also, this change fixes memory overuse in DBSet. When initializing
    DBSet from a database table, there's no need to use an FPTree with big
    preallocated pool for the new entries that are added during recent sync.
    ivan4th committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    6e3aa16 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4984889 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2024

  1. Configuration menu
    Copy the full SHA
    bb31cc6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e5a401 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2753560 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f5cae06 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9e585e5 View commit details
    Browse the repository at this point in the history