mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-7952 - clock_gettime() takes 0.24% in OLTP RO
Initialize abs_timeout when it is about to be used. This saves one my_hrtime() call on hot path (when we acquire MDL lock without waiting). When filling I_S.PROCESSLIST use THD::start_utime/THD::utime_after_query instead of THD::start_time. This allows us to save 2 clock_gettime() calls. Overhead change: __clock_gettime 0.13% -> 0.11% (122 -> 76 calls per OLTP RO transaction) my_interval_timer 0.07% -> 0.06% my_hrtime 0.04% -> 0.01%
This commit is contained in:
@@ -947,7 +947,7 @@ THD::THD(bool is_wsrep_applier)
|
||||
// Must be reset to handle error with THD's created for init of mysqld
|
||||
lex->current_select= 0;
|
||||
user_time.val= start_time= start_time_sec_part= 0;
|
||||
start_utime= prior_thr_create_utime= 0L;
|
||||
start_utime= utime_after_query= prior_thr_create_utime= 0L;
|
||||
utime_after_lock= 0L;
|
||||
progress.arena= 0;
|
||||
progress.report_to_client= 0;
|
||||
|
Reference in New Issue
Block a user