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 kIHvCPPXol+WIwAA0tVLHw (envelope-from ) for ; Wed, 04 Nov 2020 16:33:55 +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 +Iu9BPPXol9iCgAAB5/wlQ (envelope-from ) for ; Wed, 04 Nov 2020 16:33:55 +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 848429402A5 for ; Wed, 4 Nov 2020 16:33:54 +0000 (UTC) Received: from localhost ([::1]:55094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaLjM-00063k-Sn for larch@yhetil.org; Wed, 04 Nov 2020 11:33:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaLay-0002dS-BV for emacs-orgmode@gnu.org; Wed, 04 Nov 2020 11:25:12 -0500 Received: from mail-eopbgr130112.outbound.protection.outlook.com ([40.107.13.112]:4737 helo=EUR01-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaLav-0008CT-AI for emacs-orgmode@gnu.org; Wed, 04 Nov 2020 11:25:11 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FAT6B7eS1MPaoAYWDFuMPGnFxQlt9UNoLHHRv035s3HOlrVa7nZh82b6kFSCckCxwHvbtqRDKmENFDCSEzLsqpbGK/EgpKPDeaQ6ERDbe8AOA+r4ReU6iBC3K8+kDEvjYR/lveztBUanoIwJ/aGmIW7ms5tm20jlUxwe2DhomKbttihviD/SNrZEozQgWTBD9hnTunzgVwDQWH58vskxxsL2JvC4vdSrHOmHw4jsHw0C5EfwD8qjkF7TPFOgV7CAJvax0XlK52sRKkPxlKqR7vmEjja/SEaOAmtwryB5SI3GKy7PpUo3vVXXGjdeHQowCLeatjj1gKLtwl2Fekqa8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jw/FsyFGhpTCZ8UB7N3JaaKwwBEPUxO+m6ghSbEZzJo=; b=bzCOlDz53TTh4ZCIjQESmydvG1LlIMtRfWpdNkT64Wqe8rE/qQyOxONP6UsYBx9fEJ5lhvl1L8vgxw8e9F02hdwZY3EED5ZD2AXgq6KOezy32rYLDceAeHL3kJRACYAaHEwQIs4XnkcHZd+4I2wr9FcCJ/Z4OtkGfdCNyoD23bBDqGBvXtZxaBA2wrLBTKsqSuPVVJ8r5mocQe/vfXvnJuBpCWg7LPhU4HxVgl6E5yeVABaDCdkK+Lj3rTMiiVUBXn2ijeDbMBUgCsMpeiDNmR647E6T7IKhSbTN781mdu3jiXXn8L6phXph3hyNdvVQfPGTFv5W0vOjr3prb2Hnhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=whil.se; dmarc=pass action=none header.from=whil.se; dkim=pass header.d=whil.se; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Wikstrom.onmicrosoft.com; s=selector2-Wikstrom-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jw/FsyFGhpTCZ8UB7N3JaaKwwBEPUxO+m6ghSbEZzJo=; b=hgbxKFjD4IPaAEk5IO3tmKRm7htQMuw8fKdQRLC3yv0t/hXlGLl0RIkMx1O1HJR7O5GntTcUbOa5LqCbrWUZ4hFRPBc3XYWIXJJBOkh4G+mUEGtG8mKnjrN+NYmbHHVYH7bQefCxRryILTFxqnyV/gZvMGcYNFiCxUxasc20eU4= Received: from HE1PR0202MB2857.eurprd02.prod.outlook.com (2603:10a6:3:ea::22) by HE1PR0201MB2331.eurprd02.prod.outlook.com (2603:10a6:3:7e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18; Wed, 4 Nov 2020 16:10:04 +0000 Received: from HE1PR0202MB2857.eurprd02.prod.outlook.com ([fe80::45c5:3654:cf9f:bbc5]) by HE1PR0202MB2857.eurprd02.prod.outlook.com ([fe80::45c5:3654:cf9f:bbc5%4]) with mapi id 15.20.3499.032; Wed, 4 Nov 2020 16:10:04 +0000 From: =?iso-8859-1?Q?Gustav_Wikstr=F6m?= To: "emacs-orgmode@gnu.org" Subject: Speedup of org-id-update-id-locations Thread-Topic: Speedup of org-id-update-id-locations Thread-Index: AQHWssO4oCVlJj5DX0GSxoAjJwDKLw== Date: Wed, 4 Nov 2020 16:10:03 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [164.10.23.62] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 228d8471-a7ea-4729-1970-08d880dc1720 x-ms-traffictypediagnostic: HE1PR0201MB2331: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2733; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SZsCu0cZJvZJ2lbbIN5/SLTSRTo5okVvfd0Tkelo3hDqlmaUkKHN3H8AoP9ZcE9uZ955r2UfjAkTIwQgrBF11jKZo2JgJrRaFiztgSPKb6S6U2GoX3i8HdeiP/lnFbBMa5usOlAxlgOI31eIP85e9puVX10u+SuFPTcZUI4UPcCuy2nB78n5I12rDpUapPuMcx+lB1XWHAuW8jsiJPnwMRoi+GDOK/sAiIAEl0wvBVv41d6IUGYqTaS6mI3k0sAg6zgbzKWq1yRsndH9X2mjfh3MyDoy6x+gcGTsEAfGoyr7eMhhidf67B3VJtfuwx6T7tUpWW2/bmeN+UzeEGV+Vw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0202MB2857.eurprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(376002)(346002)(39830400003)(366004)(396003)(26005)(186003)(86362001)(478600001)(5660300002)(71200400001)(66476007)(66556008)(64756008)(66946007)(316002)(55016002)(66446008)(8936002)(6506007)(76116006)(8676002)(52536014)(7696005)(15650500001)(83380400001)(6916009)(33656002)(9686003)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: YdaVSGpAJHxLHc0Mor1/d3W80Qj4umDIEDfk9Zo6qcQPJKVl06trW/aUT6EZGfwcDoLUqfVXDzm0VDp70+KzMtaXDvbTQjYnFBkCoJZCFRuXnanlgpqA1NfyMWZNB59+29hDhhAlB65pszN1Ib7s8hUBSIGAudywQ3Z+94ztMRWh+gnWgf4RhsOyc4RnBafIqN0qr46Kpn+uRJYsZ9OyWglSDDKxC5zoqbVSxERaOqECLuNTKUz+pBkR6J3NW6ocexmXPMwDE6tc5omGrWszFZ4drr7JR8QWOOmgeehMVqQytj3mGaZAMMzxMXj1L8K5iid1tV0RrcuEXJ2mNNZzK8ldwNba2VZWcIjgoDXm1N0PtLMz1LacI9sgUvfIi8IzX3/2H7OClSo9PGn6DVLVJx1URvkSoeRH83owiOASP/RTJ3NfNKGWnUCf27kIXhWHmCWL5Z4VGrZgd0kTfwJE42zIh58SRyzsWTAk3FjhivThbseSZdJYuasCJWtatIDAlh0Eh+dgcHixQouOCqilY66JdTLe/apZaPNjP40ZUntLRrIxWcWsYvhcyO6I5jEgA7gK4OMhQl3Y1zVlwcU8H0o+U0lm3EPN34DZ0UtFk05lH4aHtEFZhmlo+zr8HV9ecNwTAIq1gRflEBh0xFAWIQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: whil.se X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: HE1PR0202MB2857.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 228d8471-a7ea-4729-1970-08d880dc1720 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Nov 2020 16:10:03.8696 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f6cdb11-323f-43c4-adf3-a2c5097674cd X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 39Atq4riBxSSPkc/4rybKMQz0Aym4K8AnFtud/T36TDf6nae9Nsaga7y0667i+4y X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0201MB2331 Received-SPF: pass client-ip=40.107.13.112; envelope-from=gustav@whil.se; helo=EUR01-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 11:25:07 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=Wikstrom.onmicrosoft.com header.s=selector2-Wikstrom-onmicrosoft-com header.b=hgbxKFjD; arc=pass (microsoft.com:s=arcselector9901:i=1); dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.71 X-TUID: UxLvvWt5kIlf Hi, A patch is applied to master (commit 19d2f79a0) in order to speed up th= e rebuilding of ID locations.=0A= =0A= Performance testing on my own setup shows a huge reduction in time to rebui= ld the cache. It goes from 168 seconds to 3 seconds. This performance incre= ase is not to be expected for all operating systems. But for Windows (where= Emacs has notorious problems working with the filesystem) this certainly h= elps!=0A= =0A= The rest of this mail is the content of the commit message. =0A= =0A= Kind regards=0A= Gustav=0A= =0A= --- Commit 19d2f79a0 ---=0A= Speedup of org-id-update-id-locations=0A= =0A= Since this is about performance, a benchmark before this change, on a=0A= set of 519 files with total size of 1500 kb gives the following result:=0A= =0A= 519 files scanned, 504 files contains IDs, and 911 IDs found.=0A= (168.243948 38 2.053949000000003)=0A= =0A= After the change the following result:=0A= =0A= 519 files scanned, 504 files contains IDs, and 911 IDs found.=0A= (3.034806 3 0.16445799999999622)=0A= =0A= Benchmark done on a a Windows machine with no files previously loaded=0A= into Emacs.=0A= =0A= * lisp/org-id.el (org-id-update-id-locations): This function has=0A= gotten a bit of back and forth changes in terms of performance. One=0A= year ago in 9865e6bd8 and then six months ago in 37a5020bb.=0A= Unfortunately the latest speedup actually was a speed-down. Speed is=0A= not good again.=0A=