From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wKwQBDa5gmDJiQAAgWs5BA (envelope-from ) for ; Fri, 23 Apr 2021 14:10:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id SCFSOjW5gmDvIQAA1q6Kng (envelope-from ) for ; Fri, 23 Apr 2021 12:10:29 +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 9502A12974 for ; Fri, 23 Apr 2021 14:10:29 +0200 (CEST) Received: from localhost ([::1]:35084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZudg-0003KN-Pe for larch@yhetil.org; Fri, 23 Apr 2021 08:10:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZudU-0003JD-EM for guix-devel@gnu.org; Fri, 23 Apr 2021 08:10:16 -0400 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:49769) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZudR-0003bp-Ut for guix-devel@gnu.org; Fri, 23 Apr 2021 08:10:16 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 3B36427BC7C; Fri, 23 Apr 2021 13:10:11 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 673ffd0e; Fri, 23 Apr 2021 12:10:10 +0000 (UTC) References: <79d3d2e5c1386b1e162f1ba8380562720131856d.camel@telenet.be> <87tuo7xljp.fsf@cbaines.net> <87lf9ixz5j.fsf@cbaines.net> <87wnsziing.fsf@cbaines.net> <87mttuhyoq.fsf@cbaines.net> <878s5ahzke.fsf@cbaines.net> User-agent: mu4e 1.4.15; emacs 27.1 From: Christopher Baines To: Canan Talayhan Subject: Re: [Outreachy] - Guix Data Service - Set a more informative page title In-reply-to: Date: Fri, 23 Apr 2021 13:10:08 +0100 Message-ID: <87sg3hgq1r.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619179829; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=jcmyX8oObytBTxeSB0Z89uYjaCglTba9DpZUhmvK3N8=; b=GRoJJXlqSZ7BS3hyBZllydSObQ87ZCiDqKfsoRxyWy+3e0DtFy9wpLw3fhsfp9kVHTrdEx Kvqc5SHU/jhZTDcpilEWuIFleyEpXB3cubgNfnZE3bw+C/edIONgFPSYb1AtG7YNEmy6XA kJqsyGLPoQktqaGcdeQQXQ7xjsVztVWgFztARTLATfhvvWuLOQwTbwjDyJW3I2EIX9+PWK NrUFEKUa+kbvQXqEy9N4h/xyD20AkAmBTmV8ujC9ZErfpLm9oWAIqH6xLwZJIOfmdeyArv L2VvD6DLDiFq+f72+vlzvdr4bWPffLei3JOn/jvSxdGqp2334GV8D9dlHc0jqg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619179829; a=rsa-sha256; cv=none; b=pg6kmDcWt63cAano2NsxF38JU25z4HarRWyYIoe4UvZ3Ok9GRlDHskSB3jf7Wf8h2Vixip OiUN4lGQAXDWyvOWoRmqu93PlAjy05N3QGnACz0huF6Uj7OkV2Jk6QtnUuOKrv4VUCALWW M0onJX/RhfNQ/FR2HubzijwU8wxOLSrDQBfgryDT1kxvNiqmvMqrhjQRBMYn545KCwhWa+ VfjDww7VzoSDbUfp+dDSK1H+iCQPd8VrF23We+NedbHNWSh6sIsOR86MRtqpVGgWQYMUgl QIEJvGPgGmQVYzJYP4aZxhi3GIQAV11O7sngzJ0CSF/JI6t/FkG1KUKlt9QQMA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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-Migadu-Spam-Score: -3.04 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-Migadu-Queue-Id: 9502A12974 X-Spam-Score: -3.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7L5M7XIsq2Qh --=-=-= Content-Type: text/plain Canan Talayhan writes: > It seems after testing lots of pages this one escaped me since I only > tested the working case. > > Please find the quick fix in the link below. > https://pastebin.ubuntu.com/p/s7tWyPHZ8F/ Great, that fixes the issue with the revision comparison page. > I'm looking forward to making another contribution. Could you please > review it as soon as possible? I've gone ahead and merged this. I made some changes to the indentation, I've generally just left that to Emacs, so that's effectively the indentation style currently. I also tweaked the wording in the commit message. As for what to do next, it would be good to start looking at some stuff that's more related to the project topic. Part of the revision processing that I believe is quite slow and hopefully can be improved is populating the package_metadata table. The relevant lines in the job output look something like this: debug: Starting querying the temp_package_metadata debug: Finished querying the temp_package_metadata, took 1902 seconds That output comes from the with-time-logging bit around here [1]. It's a single query, generated by temp-table-select-query which is taking around 30 minutes it seems, and I'd hope either the query can be made faster, or some other faster way of doing what needs doing here can be found. 1: https://git.savannah.gnu.org/cgit/guix/data-service.git/tree/guix-data-service/model/utils.scm#n333 insert-missing-data-and-return-all-ids is used in a few places, but this specific issue arises when called from here [2]. 2: https://git.savannah.gnu.org/cgit/guix/data-service.git/tree/guix-data-service/model/package-metadata.scm#n373 Making inserting package metadata faster is the overall goal, but I'd suggest first just trying to reproduce the slow query outside of the revision processing process. That way you'll be able to look at what the query is doing and quickly test changes. The approach I'd recommend is, make yourself a realistic temp_package_metadata table by populating it with all the package_metadata entries for a single revision already in your local database. Then construct and try the slow query, and see how long it takes, and look at the query plan (run the query with EXPLAIN at the start). Do let me know if you have any questions or get stuck, I'll hopefully be around on IRC, and if I don't respond within a few minutes there, just email me. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmCCuSBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XenPA//VvCQl8kpANm6liHdxzF5UgmUpCxTYXBU fx6yKfx2c5fO2+n1HYKSj3Il0dVg5x3oMb3Dtqov2yYWFzFe/bPP6o/LfVbFxi+w xVJFYI5Qru1zMZphdkQJ9lw5FvMGNXcPYd82vUrcbmuFnMzuvkwL9MToMDRXpYc8 nDL9xpTKaALPmRVMdBMszSao2RaYCJDyE6gL50xnHty9VL3MOwFZsZNPx84Zjm5d gunDz/HUTcsC47ZfuqggeVpNg2hWx8uVIv9Q8fJfDO/8Q8eW0qgnrYy+WeYp7bGx LbPvZfCLUVaOch9cYgyY78Mp4N/fXMWWtX0h9xA2SUoC+jHgn40Zw5mUnenKTjru t7c+CG6m6BYuUpVRHR07HRA3IzL6zN5qGTJG/sfgP+LTf/iUv/HVIoaJ/JvK9+8Y SGOxrFw77J8h02IF3+ofunlcc18mx5FEmbHzxgMSPpEgxdemSTBKNfTUPAbHIi6y isLCEIh7aP3mzTVIs915EeSqe6zWyc6PXxJkeCAjtG4ixPTDeVwDjCPpd/RuFoAL bf/5pPEh0/qgH9/Aeh5su/ChFBJOI4cOccP1J+5uM5VWLcSHSpdKR7Ri924baGke B0RkE3ugHPmRgB4714780/d275u6AL9cJ4SUWP4fRwySyFPvtO3gA4a/RKQDZ7Fb G31VRLukJGI= =0QR2 -----END PGP SIGNATURE----- --=-=-=--