From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id m3e6OUsBoF9uYwAA0tVLHw (envelope-from ) for ; Mon, 02 Nov 2020 12:53:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id INkNNUsBoF+oUgAAB5/wlQ (envelope-from ) for ; Mon, 02 Nov 2020 12:53:31 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AEEE19401BE for ; Mon, 2 Nov 2020 12:53:31 +0000 (UTC) Received: from localhost ([::1]:51792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZZL0-0001Jy-Go for larch@yhetil.org; Mon, 02 Nov 2020 07:53:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZZKr-0001Jg-TB for guix-devel@gnu.org; Mon, 02 Nov 2020 07:53:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44481) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZZKr-0005gA-1d; Mon, 02 Nov 2020 07:53:21 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50918 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZZKq-0008U8-H5; Mon, 02 Nov 2020 07:53:20 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#44053: =?utf-8?Q?=E2=80=98xdg-mime-database=E2=80=99?= profile hook is slow References: <87o8l7pple.fsf@gnu.org> <87h7qxhncq.fsf@gnu.org> <3aQjRn5jGhxHrhAmuB3MfLRjSxAp3PVFu1vL7_GV1ucGibzYURCtMqHN4oeyGb5xez2xYM3loEJIECrVdnAGZBZvf0N1bGXN-80mO6Ymr6k=@protonmail.com> <87sgagv8qt.fsf@dismail.de> <87o8l279eb.fsf@gnu.org> <4JD1z15e92ccv6WXcMS5IiNJnDwR6P3bkIwtPWLUPYDVCUHYDoekpifyj3GQtnEq1LCKftbL-FV1hp162A1mid2EmjLMbWlxQ05aE9vGyf0=@protonmail.com> <87v9f842uu.fsf@gmail.com> <87v9f7gspm.fsf@dismail.de> <874kmn9adz.fsf_-_@gnu.org> <87ft5zqn2a.fsf@dismail.de> <87sg9sm2qf.fsf@gnu.org> Date: Mon, 02 Nov 2020 13:53:18 +0100 In-Reply-To: <87sg9sm2qf.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 02 Nov 2020 12:12:40 +0100") Message-ID: <87ft5rncn5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel , Luis Felipe , 44053@debbugs.gnu.org, Maxim Cournoyer Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: neYus/WP57WY Ludovic Court=C3=A8s skribis: > Apart from LibreOffice, I found that =E2=80=98share/mime/packages=E2=80= =99 is provided > by at least: hugin, gcr, fontforge. Most GUI packages don=E2=80=99t have= it. > So in practice, we=E2=80=99re often rebuilding the exact same database. On closer inspection, the time-consuming bit is processing =E2=80=98share/mime/packages/freedesktop.org.xml=E2=80=99 (from =E2=80=98sh= ared-mime-info=E2=80=99), which is quite large and leads to the creation of hundreds of file. We end up re-processing it every time. This is particularly wasteful because the =E2=80=98shared-mime-info=E2=80=99 package already contains the= result of applying =E2=80=98update-mime-database=E2=80=99 to itself. Unfortunately, AIUI, update-mime-database(X =E2=88=AA Y) =E2=89=A0 update-mime-database(X) =E2= =88=AA update-mime-database(Y) (For example, the files =E2=80=98share/mime/{globs,magic,XMLnamespaces,subclasses,aliases,types,gen= eric-icons,icons,treemagic,mime.cache}=E2=80=99 concatenate info from X and Y.) So it would seem we cannot simply used the pre-built database from =E2=80=98shared-mime-info=E2=80=99 and merge it with that of the other pack= ages, at least not without changing =E2=80=98update-mime-database=E2=80=99 or re-imp= lementing parts of it on our side. Ludo=E2=80=99.