From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Subject: bug#32234: [PATCH 2/2] database: Serialize all database accesses in a thread. Date: Mon, 06 Aug 2018 21:35:08 +0200 Message-ID: <87r2jbmgpf.fsf@lassieur.org> References: <20180806192736.1747-1-clement@lassieur.org> <20180806192736.1747-2-clement@lassieur.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmlIV-00084f-Kf for bug-guix@gnu.org; Mon, 06 Aug 2018 15:36:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmlIQ-0008Eo-Oz for bug-guix@gnu.org; Mon, 06 Aug 2018 15:36:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:37893) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmlIQ-0008EK-JZ for bug-guix@gnu.org; Mon, 06 Aug 2018 15:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fmlIQ-0006Fg-3X for bug-guix@gnu.org; Mon, 06 Aug 2018 15:36:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <20180806192736.1747-2-clement@lassieur.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 32234@debbugs.gnu.org Hi, Cl=C3=A9ment Lassieur writes: [...] > bin/cuirass.in | 23 +- > src/cuirass/base.scm | 94 +++---- > src/cuirass/database.scm | 550 +++++++++++++++++++++------------------ > src/cuirass/http.scm | 136 +++++----- > src/cuirass/utils.scm | 23 +- > tests/database.scm | 103 ++++---- > tests/http.scm | 21 +- > 7 files changed, 494 insertions(+), 456 deletions(-) Pros: - fix the fact that long SQL queries block the scheduler - simplify the code, and make it more uniform Cons: - we don't take advantage of the SQLite multi-threading features anymore I've run some tests, and I didn't see any difference in terms of performance. Cl=C3=A9ment