Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • M medialibrary
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VideoLAN
  • medialibrary
  • Merge requests
  • !471

Optimize sqlite::Connection::updateHook

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Hugo Beauzée-Luyssen requested to merge chouquette/medialibrary:optimize_update_hook into master Sep 16, 2021
  • Overview 1
  • Commits 6
  • Pipelines 1
  • Changes 14

The lookup in the hooks container causes a temporary string to be created & destroyed each time the hook is invoked, which will happen at least once per insert/update/delete, and likely more when triggers get invoked.

The save is not major, but since it seems most of the time is now spent in malloc/free, that's still a nice save.

This also uses xxHash instead of the default C++ hash, so this is based on !470 (merged)

before: before

after: after

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: optimize_update_hook

VideoLAN code repository instance