Patch Detail
Show a patch.
GET /api/patches/22673/?format=api
{ "id": 22673, "url": "https://patchwork.libcamera.org/api/patches/22673/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22673/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20250130115001.1129305-4-pobrn@protonmail.com>", "date": "2025-01-30T11:50:18", "name": "[RFC,v3,03/21] apps: common: event_loop: Use `std::deque` instead of `std::list`", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "200a35c46dc301f3e70993947c6fedc04c0d51e4", "submitter": { "id": 133, "url": "https://patchwork.libcamera.org/api/people/133/?format=api", "name": "Pőcze Barnabás", "email": "pobrn@protonmail.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/22673/mbox/", "series": [ { "id": 4978, "url": "https://patchwork.libcamera.org/api/series/4978/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4978", "date": "2025-01-30T11:50:08", "name": "apps: lc-compliance: Multi-stream tests", "version": 3, "mbox": "https://patchwork.libcamera.org/series/4978/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22673/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22673/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E3499BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Jan 2025 11:51:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 94B7B6856B;\n\tThu, 30 Jan 2025 12:51:31 +0100 (CET)", "from mail-4322.protonmail.ch (mail-4322.protonmail.ch\n\t[185.70.43.22])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DEC8268564\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jan 2025 12:51:29 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"SIGfMAhp\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1738237889; x=1738497089;\n\tbh=RlWobZ/H0WWwvgbFlZzkTlSBuNxPsg2LYAMadRltoag=;\n\th=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;\n\tb=SIGfMAhp+WbrDvAQusk6S7RG9HajOChuQd73AgG5Aj8nLgocCD9mxmhpDsbLsfvk9\n\tXFheDnIHESzbpbLcIz0YgaX6kmqMGa2os+sOs2zmBjBeEPrRi00dspD5eU3P4UTWEj\n\tqDjGHbS/TlcMdEF6ifsigEfIWIICQlXDkz4k4lTZVLPplTRfRy6ikXXXtmum92JIz3\n\tNOElYuAPYnNVYjShYecEWNuB9pT3Ti90JrCQFDnmd8TudjB/M3J38rrUCHuRr5gZDu\n\tJ/RHZIGRlUitiOziqyE/0zEZDaFqYMnK7hDc7cQ/8k+Mn0oqbdWkMF2ttq52oyw0rn\n\tNt3pde3TXQ9VA==", "Date": "Thu, 30 Jan 2025 11:50:18 +0000", "To": "libcamera-devel@lists.libcamera.org", "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>", "Subject": "[RFC PATCH v3 03/21] apps: common: event_loop: Use `std::deque`\n\tinstead of `std::list`", "Message-ID": "<20250130115001.1129305-4-pobrn@protonmail.com>", "In-Reply-To": "<20250130115001.1129305-1-pobrn@protonmail.com>", "References": "<20250130115001.1129305-1-pobrn@protonmail.com>", "Feedback-ID": "20568564:user:proton", "X-Pm-Message-ID": "a05cc21231e9c2e1e1f3639077a6c5610ed9f755", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=utf-8", "Content-Transfer-Encoding": "quoted-printable", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Deque has fast pop_front and push_back operations while making\nfewer allocations for the same number of elements as an `std::list`.\nSo use an `std::deque` for storing the deferred calls of the loop.\n\nSigned-off-by: Barnabás Pőcze <pobrn@protonmail.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/apps/common/event_loop.h | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/apps/common/event_loop.h b/src/apps/common/event_loop.h\nindex 4e8dd0a46..760075885 100644\n--- a/src/apps/common/event_loop.h\n+++ b/src/apps/common/event_loop.h\n@@ -8,6 +8,7 @@\n #pragma once\n \n #include <chrono>\n+#include <deque>\n #include <functional>\n #include <list>\n #include <memory>\n@@ -63,7 +64,8 @@ private:\n \tstruct event_base *base_;\n \tint exitCode_;\n \n-\tstd::list<std::function<void()>> calls_;\n+\tstd::deque<std::function<void()>> calls_;\n+\n \tstd::list<std::unique_ptr<Event>> events_;\n \tstd::mutex lock_;\n \n", "prefixes": [ "RFC", "v3", "03/21" ] }