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 iIMoEsDZX2BRBQAAgWs5BA (envelope-from ) for ; Sun, 28 Mar 2021 03:20:00 +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 SCsXDMDZX2D7IgAA1q6Kng (envelope-from ) for ; Sun, 28 Mar 2021 01:20:00 +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 B3E6E102A8 for ; Sun, 28 Mar 2021 03:19:59 +0200 (CEST) Received: from localhost ([::1]:53110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQK5u-0005u1-QF for larch@yhetil.org; Sat, 27 Mar 2021 21:19:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPU1u-0001jF-Pp for emacs-orgmode@gnu.org; Thu, 25 Mar 2021 13:44:22 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:10162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lPU1o-0001mN-Kz for emacs-orgmode@gnu.org; Thu, 25 Mar 2021 13:44:22 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4F5sst3mfZzQjmP; Thu, 25 Mar 2021 18:44:02 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id z9FhAyg7i5eJ; Thu, 25 Mar 2021 18:43:59 +0100 (CET) From: Leo Okawa Ericson To: emacs-orgmode@gnu.org Subject: [PATCH 0/1] Add option to delay fontification of source blocks Date: Thu, 25 Mar 2021 18:43:40 +0100 Message-Id: <20210325174341.104985-1-git@relevant-information.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-SPAM-Probability: * X-Rspamd-Score: 0.26 / 15.00 / 15.00 X-Rspamd-Queue-Id: 8A0F117BE X-Rspamd-UID: be122a Received-SPF: pass client-ip=80.241.56.151; envelope-from=leo@relevant-information.com; helo=mout-p-101.mailbox.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 27 Mar 2021 21:16:27 -0400 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: , Cc: Leo Okawa Ericson Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616894399; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LYwcpTwKWYgekGJNPK9xQRu5lAisT8vyP4nMqqTC71c=; b=a77fu45rFllM6yg5SxMvL/+G5SteccAUf8guenNowjN1v4np/O4OZmjCRaNBA9zKxRTO3e M/0wmNCkVNN1RVi8+2ZImSOx4Iahkw3D6GRg1BMKxZVEL0vlpW3vzdyb+Q2u5lQ4jG5Vzw +AHMd6iVEVB4Orp8puU693fMziSLQLUzYpE61fv+xPG055jKRoDKyYAVTYVDTY9sVz+hNW AXnorRP2AE5NCazXYaSjD+G6wW+STzvdjF5m8zPXEW63abcouwjCIlcJVCggPutakQ9R6s C+ITsRXcH/4Fr2pA8SqFE48GZMLHcBJ1djlykcxB0vbjp45mhMu0UD+ZDfAHxA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616894399; a=rsa-sha256; cv=none; b=gKTRaYoR7AAuAuVZAjQjjPmCL7jKXuNLcXBkMRvkZS7ox8j7PiupVidmqfClH93uzjDyG6 JtbRNq6EPa3sbnVMqfVATHORNuh3ENSg7JTFO4JM1AGZLlosrGsPGYEdwM6iaE+3cBMq3F MOCFtIRkJyCCM2D/2SI+2JzoxsOy69PGb/B5UN4WrhCfANB6DUA4K2AwF8/7VG73VezuXJ 8sO9n+P+cOkKl3Kjiemg3QIguE+BEh/U3kO13+e2HAfd5z5uuY6I/pNfm2pdakLmzVVMPi zBKw85nsx1ScXuxpaRNpXrXXi0LTeSDTkdt10gYPNQafWi0o3TgvJ1AF/8Wlng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Migadu-Spam-Score: 3.58 Authentication-Results: aspmx1.migadu.com; dkim=none; 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-Migadu-Queue-Id: B3E6E102A8 X-Spam-Score: 3.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: W9BVq2kA0x2P From: Leo Okawa Ericson I tried sending this patch once before, but I think it got caught as spam so I'm trying this again. Fontification of long code blocks can be very slow. The patch (in the reply to this email) mitigates this by adding an option to delay the fontification after the user has become idle by using idle timers. This seems to be faster from my limited testing, but I'm not sure if something will go horribly wrong because of the timers. There is a trade-off in that there will be no syntax highlightinting when the user is typing. I don't know how to keep existing fontification so it would be great if somebody could share a solution to that. I have signed the copyright papers so that shouldn't be a problem. This is my first patch submission so any suggestions for improvement are welcome. Leo Okawa Ericson (1): org-src.el: Add option to delay fontification of source blocks lisp/org-src.el | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) -- 2.25.1