[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suggest: Byte-Compile package-quickstart on a separate thread?
From: |
T.V Raman |
Subject: |
Re: Suggest: Byte-Compile package-quickstart on a separate thread? |
Date: |
Mon, 28 Dec 2020 13:50:54 -0800 |
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" <raman@google.com> writes:
>
> > "T.V Raman" via "Emacs development discussions." <emacs-devel@gnu.org>
> > 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)))
>
> I think this patch might have also the following two issues:
>
> - Doing intense computation in a Lisp thread usually make the system
> extremely unresponsive, and it does it certanly if the code does not
> yield. As the byte compiler never yields the 'blocking' effect should
> be the same as running in the main thread, this because this Lisp
> thread is never preempted.
>
> - What about if the file being compiled is loaded before the byte
> compilation is completed? This is another tricky part that has to be
> addressed (as we had to do in the native compiler).
>
> Regards
>
> Andrea
--
♉Id: kg:/m/0285kf1 🦮♉
--
♉Id: kg:/m/0285kf1 🦮♉