From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6646B469711 for ; Sat, 23 May 2020 21:30:34 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id o14so16563950ljp.4 for ; Sat, 23 May 2020 11:30:34 -0700 (PDT) Date: Sat, 23 May 2020 21:30:32 +0300 From: Konstantin Osipov Message-ID: <20200523183032.GB2714@atlas> References: <0f65635ef9ee95131ac0e83b0b70e8c204a322b8.1589968157.git.kyukhin@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0f65635ef9ee95131ac0e83b0b70e8c204a322b8.1589968157.git.kyukhin@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 1/2] Copy DSO module before load instead of symlink-ing List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org * Kirill Yukhin [20/05/20 12:54]: > + int ch; > + while( ( ch = fgetc(source) ) != EOF ) > + fputc(ch, target); This code looks like it is copied from stackoverflow? For one, it does not follow Tarantool coding style. and it's copying the file one byte at a time, good at least it's in buffered mode?! > + fclose(source); > + fclose(target); Please use libeio or, as last resort, sendfile(). Tarantool is a single threaded high-performance database and application server. It's not OK to block the event loop for a few hundred thousand instructions (and here we can easily get millions). -- Konstantin Osipov, Moscow, Russia