From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Suppressing native compilation (short and long term) Date: Thu, 06 Oct 2022 11:03:47 +0300 Message-ID: <83czb5qsyk.fsf@gnu.org> References: <87bkqxf1ij.fsf@tethera.net> <8335c9dkyf.fsf@gnu.org> <83tu4odez7.fsf@gnu.org> <871qrrpkgx.fsf@trouble.defaultvalue.org> <834jwnbi6c.fsf@gnu.org> <87mtafnun5.fsf@trouble.defaultvalue.org> <83sfk6ahty.fsf@gnu.org> <87v8p1aiof.fsf@melete.silentflame.com> <87v8p01lbu.fsf@yahoo.com> <83lepwvzxq.fsf@gnu.org> <871qroyog9.fsf@yahoo.com> <837d1gvt35.fsf@gnu.org> <87sfk3yl10.fsf@yahoo.com> <87o7uqtlsl.fsf@yahoo.com> <83sfk2rzjs.fsf@gnu.org> <87k05du6x0.fsf@yahoo.com> <83tu4hqxp8.fsf@gnu.org> <87ilkxs9yg.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18795"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, akrl@sdf.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 06 10:12:20 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogLzQ-0004dn-47 for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Oct 2022 10:12:20 +0200 Original-Received: from localhost ([::1]:55072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogLzN-0005Mc-Ij for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Oct 2022 04:12:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogLrF-0002If-LN for emacs-devel@gnu.org; Thu, 06 Oct 2022 04:03:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogLrD-0001eA-Qn; Thu, 06 Oct 2022 04:03:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=777itLv8s1u5PETwsHB+axoQUsn0y8lb2QLxv2aYr1A=; b=JbzUBvFKEwVq 6ORlPlIH4tki55xFH5/ntKGTgkPLexOLct4/A7rgUYS+ulfRb1+QcP0h/f3kj713TiIc96fRyxDJx jmvlFClBwJorfRioBlvFDaPoTmWwsP5GKj8WMrXL4Z1NHXSBJKPfwGdfE87Xlcrzm9nOAcEGSpZYh 4M7ERwFOMy2pJYwNpmColJWO6G3C6Eb9jY0xU923rX3JorSRX9110osJQnX/v4C72Q6s1NDedUvKz RYLDPRzh9c7FsAsw8FSGoa1GgkPHUZChIWlo8NSXpTLTqjieaHOuN2jcnPF6O7Yrl7K1Dw2E2vHDh PhSyL5a8PdpbHy7bfey6+A==; Original-Received: from [87.69.77.57] (port=4078 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogLr9-0000JD-1z; Thu, 06 Oct 2022 04:03:51 -0400 In-Reply-To: <87ilkxs9yg.fsf@yahoo.com> (message from Po Lu on Thu, 06 Oct 2022 15:11:19 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297077 Archived-At: > From: Po Lu > Cc: spwhitton@spwhitton.name, rlb@defaultvalue.org, > monnier@iro.umontreal.ca, david@tethera.net, emacs-devel@gnu.org, > akrl@sdf.org > Date: Thu, 06 Oct 2022 15:11:19 +0800 > > Eli Zaretskii writes: > > > Anyway, what would you suggest as a solution for the problem you > > perceive with JIT native-compilation, which would refrain from being > > "in the background" and "automatic"? > > The solution I would propose would be to defer JIT native-compilation > until the computer is on AC power, as determined by battery.el. We could have such a feature, but how to implement it? If we use a timer for that, the timer itself will drain the battery. And if defer it to the next invocation of the bytecode, we might never compile, because who can guarantee that the laptop is on AC when some arbitrary bytecode is executed? Any other ideas?