From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Arthur Miller <arthur.miller@live.com>
Cc: emacs-devel@gnu.org
Subject: Re: 28.0.50; Proposal: slightly more efficient package-quickstart.el
Date: Fri, 23 Jul 2021 10:36:34 -0400 [thread overview]
Message-ID: <jwv4kclt8hm.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <AM9PR09MB4977C92EBE1D4939F4B5513A96E49@AM9PR09MB4977.eurprd09.prod.outlook.com> (Arthur Miller's message of "Fri, 23 Jul 2021 00:38:36 +0200")
>>> Not so much, but it is not so much about noticable difference, more
>>> about not performing unnecessary computation.
> I agree that simplicity and code clarity is important, on many
> levels. But maybe we can have the cake and it it too, as you said
> for wdired?
In the case of wdired there was a concrete gain.
Here it's only hypothetical, so the positive motivation is quite different.
Also `package-quickstart` is fairly tricky to troubleshoot (beyond removing
or refreshing the file). To the end user it's largely a magical button,
so it's really important to make it work reliably.
IOW the incentives are strongly opposed to your proposition.
> Last weekend I tested actually myself to restructure how my packages are
> loaded. I noticed that init time increased after I added ~100 packages,
> just for test, and I didn't required anything of that into Emacs. So I
> tested the idea to put all .elc file into a single place and skipp in
> entirety this monstrosity of load-path that results after 200 packages
> are loaded. I got it to work to a degree, it least I got running Emacs,
> native compiler not complaining and most packages loaded, but I also got
> some cyclic dependency, notably for dired and semantic of all things,
> that actually rendered entire session unusable for the most part. I'll
> leave that for another day when I have some more time.
Moving the .elc files to a separate (short) list of directories indeed
one way we could address the situation where there are too many entries
on `load-path`.
Another way would be to scan `load-path` "once" and populate
a hash-table from that, after which (load "foo" ...) could be sped up by
looking up "foo" in the hash-table.
Still, that presumes that finding a file is the main issue, but I don't
know if that would indeed be true.
> (when (re-search-forward rx-path-beg nil t)
> (goto-char (line-beginning-position))
> (setq temp-point (point))
> (forward-sexp)
> (when (search-backward file nil t 1)
> (goto-char temp-point)
> (kill-sexp)))
I'd do something like
(while (re-search-forward "^(add-to-list" nil t)
(goto-char (match-beginning 0))
(let ((start (point))
(x (read (current-buffer))))
...)))
-- Stefan
next prev parent reply other threads:[~2021-07-23 14:36 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-20 0:27 28.0.50; Proposal: slightly more efficient package-quickstart.el Arthur Miller
2021-07-20 2:54 ` Stefan Monnier
2021-07-20 6:01 ` Arthur Miller
2021-07-20 15:49 ` Stefan Monnier
2021-07-22 22:38 ` Arthur Miller
2021-07-23 14:36 ` Stefan Monnier [this message]
2021-07-23 14:50 ` Async rebuild package-quickstart after packages update? was " T.V Raman
2021-08-03 22:20 ` Stefan Monnier
2021-08-04 2:24 ` T.V Raman
2021-08-04 3:25 ` Stefan Monnier
2021-08-04 14:20 ` T.V Raman
2021-08-04 17:19 ` Stefan Monnier
2021-08-04 18:36 ` T.V Raman
2021-08-05 0:22 ` T.V Raman
2021-08-05 6:00 ` Eli Zaretskii
2021-08-05 14:17 ` T.V Raman
2021-08-05 14:29 ` T.V Raman
2021-08-05 14:59 ` Stefan Monnier
2021-08-05 15:21 ` T.V Raman
2021-08-05 16:23 ` Stefan Monnier
2021-08-06 5:18 ` Arthur Miller
2021-08-06 6:39 ` Eli Zaretskii
2021-08-06 13:20 ` Arthur Miller
2021-08-06 13:28 ` Eli Zaretskii
2021-08-06 14:13 ` Arthur Miller
2021-08-06 14:53 ` Arthur Miller
2021-08-07 0:46 ` chad
2021-08-07 5:26 ` Eli Zaretskii
2021-08-07 5:45 ` Arthur Miller
2021-08-06 14:24 ` Stefan Monnier
2021-08-06 14:29 ` T.V Raman
2021-08-05 16:25 ` Eli Zaretskii
2021-08-05 16:57 ` T.V Raman
2021-08-05 17:03 ` Eli Zaretskii
2021-08-05 18:11 ` Stefan Monnier
2021-08-05 18:23 ` T.V Raman
2021-08-05 19:48 ` On The Use(fullness) of make-thread " T.V Raman
2021-08-06 5:24 ` Arthur Miller
2021-08-07 4:19 ` Clément Pit-Claudel
2021-08-07 5:38 ` Arthur Miller
2021-07-23 17:00 ` Arthur Miller
2021-07-23 22:26 ` Arthur Miller
2021-07-23 22:37 ` Arthur Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv4kclt8hm.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=arthur.miller@live.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.