From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp61.i.mail.ru (smtp61.i.mail.ru [217.69.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id F110B445320 for ; Thu, 16 Jul 2020 01:09:36 +0300 (MSK) References: <1594221263-6228-1-git-send-email-alyapunov@tarantool.org> <1594221263-6228-17-git-send-email-alyapunov@tarantool.org> <11582023-5848-99ed-a5e8-b0d0eb6a9c3f@tarantool.org> <4c333f19-2c83-aef2-7fe9-37cc9f7e05c9@tarantool.org> From: Vladislav Shpilevoy Message-ID: <7b1f5ef1-f134-eb9a-862a-e17bae838082@tarantool.org> Date: Thu, 16 Jul 2020 00:09:34 +0200 MIME-Version: 1.0 In-Reply-To: <4c333f19-2c83-aef2-7fe9-37cc9f7e05c9@tarantool.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Tarantool-patches] [PATCH 16/16] tx: use new tx manager in memtx List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aleksandr Lyapunov , tarantool-patches@dev.tarantool.org >> +static int >>> +memtx_engine_prepare(struct engine *engine, struct txn *txn) >>> +{ >>> +    (void)engine; >>> +    struct txn_stmt *stmt; >>> +    stailq_foreach_entry(stmt, &txn->stmts, next) { >>> +        if (stmt->add_story != NULL || stmt->del_story != NULL) >> 1. Seems like it is worth moving this check into a static inline >> function in the txn.h header. You use it a lot. > It's a virtual method, it can't be inlined.. I am talking about the check. Not about the memtx_engine_prepare(). stmt->add_story != NULL || stmt->del_story != NULL This line can be moved into a static inline function in txn.h.