Bug #114074 optimize for Writeset_trx_dependency_tracker::get_dependency
Submitted: 21 Feb 2024 8:35 Modified: 21 Feb 2024 10:37
Reporter: alex xing (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S5 (Performance)
Version:8.0.32 OS:Any
Assigned to: CPU Architecture:Any

[21 Feb 2024 8:35] alex xing
Description:
optimize for Writeset_trx_dependency_tracker::get_dependency 
1. Use emplace instead of insert to reduce the generation of temporary objects
2. Previously, the logic needed to perform find and insert operations on the map, but it can be optimized into one operation

How to repeat:
just read the code

Suggested fix:
optimize as the below pacth baseed on 8.0.32
[21 Feb 2024 8:36] alex xing
a simple patch to describe the optimization based on 8.0.32

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: optimize_for_get_dependency.patch (text/plain), 1.12 KiB.

[21 Feb 2024 10:37] MySQL Verification Team
Hi,

Thank you for your contribution