From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: Suggest: Byte-Compile package-quickstart on a separate thread? Date: Mon, 28 Dec 2020 13:50:54 -0800 Message-ID: <24554.21310.267903.605613@retriever.mtv.corp.google.com> References: <20201228144919.35B80C23000@raman-glaptop.localdomain> <24554.9038.480017.868364@retriever.mtv.corp.google.com> Reply-To: "T.V Raman" Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20220"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, raman@google.com To: akrl@sdf.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 28 22:52:15 2020 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 1ku0R5-0005Aa-OT for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Dec 2020 22:52:15 +0100 Original-Received: from localhost ([::1]:49808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ku0R4-0002xi-RV for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Dec 2020 16:52:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ku0Q1-00025Q-KN for emacs-devel@gnu.org; Mon, 28 Dec 2020 16:51:09 -0500 Original-Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:43772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ku0Pr-0003Hw-U3 for emacs-devel@gnu.org; Mon, 28 Dec 2020 16:51:09 -0500 Original-Received: by mail-pg1-x52a.google.com with SMTP id n10so8005682pgl.10 for ; Mon, 28 Dec 2020 13:50:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:mime-version:content-transfer-encoding:message-id:date:to:cc :subject:in-reply-to:references; bh=lZGoUqvVjT5jpTqcrbWfnlfjKJ2FqEJnnHSaR4FQS9o=; b=G3ZzCXPHMTXRjdcfB6JdbEYNrkY6RYpN0KdB0AvJHMYwgruSR6fynVFSazLMxEIrxY 2a+J525Xen0ywwe+cBTPIxHwwRuzGnFKxUtcFpkLbcWJ2qSuUtJoYI6pdgYafHqW2Tvr a7gqpWNc4tmUggf1xvAWFgoaAIWkifHKY8eJdtDiA80DcReK69ah37EcK8GFHzHTGl53 r4dp5sSWApZtfBlPMCJ5wuBargcw+k1+1rI5nEekjZIXfVw/f1jtuo8Wusc9Dg8DPelV xFJkuE5WmewFDiCQo84r6y8UNh0/4M/EquK+8GBL1ohvs6yJJTn1/XQ+1947SHpjKyCj Of/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:content-transfer-encoding :message-id:date:to:cc:subject:in-reply-to:references; bh=lZGoUqvVjT5jpTqcrbWfnlfjKJ2FqEJnnHSaR4FQS9o=; b=HsNHIxqF8n8VplRVuNZAbcy6QpnS1aqM+1wZPf+Ouf1ogaZEwdIAVwDJ2vsnbhVjA3 yiH0RHKC4g+8EeDLh+HTKviyx+7JbbIJXpyrzYUiDs/qn7b29FmeCsNU3HtlTAe93amJ DfLCg+9G4BoFp1sqlur13GVGn8rn/RkBfQrkxOvj2i5eKqZySZRibpB2ah1oBKofbhYP GU4G6kid11wTdMoq4CWZD5Vg9mcItOYiDL9k5PCtpfs4QiSu8498uuqBIYkUXsdLSwyn 92H9RJeK8bo3binaGXH1XLqyDSSUxi3LbXKi3+V64EMw28+9FCsT2kiuRfClHVwCwLNk di9g== X-Gm-Message-State: AOAM5335PJ3Ch2ipKftSm1KeC051klXkDI0SBQ4TIgve9VDeUQSjik8+ N5jx7uvVMkX9rk8jeW2hWMOQNI/UGS3liA== X-Google-Smtp-Source: ABdhPJz2s6f/vyCecutkqVhO6WDc5kaa8F4/yuOvpkEdEwDyDwvadmCqLKS3LgcsB+pz7cYGs/nEBg== X-Received: by 2002:a05:6a00:14cd:b029:18b:fac7:d88 with SMTP id w13-20020a056a0014cdb029018bfac70d88mr24222950pfu.6.1609192256267; Mon, 28 Dec 2020 13:50:56 -0800 (PST) Original-Received: from retriever.mtv.corp.google.com ([2620:0:1000:1510:7220:84ff:fe0f:a150]) by smtp.gmail.com with ESMTPSA id w27sm33044350pfq.104.2020.12.28.13.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 13:50:55 -0800 (PST) Original-Received: by retriever.mtv.corp.google.com (Postfix, from userid 13930) id 54E3E18003D4; Mon, 28 Dec 2020 13:50:54 -0800 (PST) In-Reply-To: X-Mailer: VM 8.1.1 under 28.0.50 (x86_64-pc-linux-gnu) Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=raman@google.com; helo=mail-pg1-x52a.google.com X-Spam_score_int: -202 X-Spam_score: -20.3 X-Spam_bar: -------------------- X-Spam_report: (-20.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, NICE_REPLY_A=-2.698, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:262037 Archived-At: I buy your first argument. The second not so much so though it's moot given the first argument. Andrea Corallo writes: > "T.V Raman" writes: >=20 > > "T.V Raman" via "Emacs development discussions." > > writes: > > Here's a small patch that uses make-thread: > > > > git diff package.el > > > > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.= el > > index bc450b09d0..104c2d8e71 100644 > > --- a/lisp/emacs-lisp/package.el > > +++ b/lisp/emacs-lisp/package.el > > @@ -4108,7 +4108,7 @@ package-quickstart-refresh > > ;; no-update-autoloads: t > > ;; End: > > ")) > > - (byte-compile-file package-quickstart-file))) > > + (make-thread #'byte-compile-file package-quickstart-file))) >=20 > I think this patch might have also the following two issues: >=20 > - Doing intense computation in a Lisp thread usually make the system= > extremely unresponsive, and it does it certanly if the code does n= ot > yield. As the byte compiler never yields the 'blocking' effect sh= ould > be the same as running in the main thread, this because this Lisp > thread is never preempted. >=20 > - What about if the file being compiled is loaded before the byte > compilation is completed=3F This is another tricky part that has = to be > addressed (as we had to do in the native compiler). >=20 > Regards >=20 > Andrea --=20 =E2=99=89Id: kg:/m/0285kf1 =F0=9F=A6=AE=E2=99=89 -- ♉Id: kg:/m/0285kf1 🦮♉