From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: Suppressing native compilation (short and long term) Date: Thu, 06 Oct 2022 10:41:14 +0000 Message-ID: References: <87bkqxf1ij.fsf@tethera.net> <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> <83czb5qsyk.fsf@gnu.org> <87edvls2ho.fsf@yahoo.com> <831qrlqms5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4766"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Po Lu , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 06 12:43:36 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 1ogOLn-00014T-V2 for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Oct 2022 12:43:35 +0200 Original-Received: from localhost ([::1]:52222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogOLm-0000wC-Iv for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Oct 2022 06:43:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogOJb-0005WC-V3 for emacs-devel@gnu.org; Thu, 06 Oct 2022 06:41:20 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:49415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogOJZ-0008RA-Po; Thu, 06 Oct 2022 06:41:19 -0400 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 296AfElg005226 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 6 Oct 2022 10:41:15 GMT In-Reply-To: <831qrlqms5.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 06 Oct 2022 13:17:14 +0300") Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org 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: 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:297086 Archived-At: Eli Zaretskii writes: >> From: Po Lu >> Cc: emacs-devel@gnu.org, akrl@sdf.org >> Date: Thu, 06 Oct 2022 17:52:35 +0800 >> >> Eli Zaretskii writes: >> >> > 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. >> >> I think display-battery-mode users (I am one such user) will not agree >> with that assessment. > > I didn't invent that, I've heard laptop users complain about timers. For my education: why timer are computational expensive? > But okay, if it's acceptable to run a timer in order to re-enable > compilation when AC power is plugged in, I'm okay with such an > optional feature. Patches are welcome. > >> > 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? >> >> We could push it onto a list of files to native compile, the files in >> which are then compiled once we detect the laptop starts to run on AC >> power. > > You will see that comp.el already has a queue of files that await > compilation. The new feature will newed to plug itself into that > mechanism, I think. Unless Andrea has a better idea. I'd suggest this way as well. BR Andrea