all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* A faster derived-mode-p
@ 2021-02-14 20:22 Lars Ingebrigtsen
  2021-02-14 22:25 ` Dmitry Gutov
  2021-02-14 23:51 ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-14 20:22 UTC (permalink / raw
  To: emacs-devel

There are only 11K commands in the Emacs tree, so I don't know whether
the current default completion predicate is going to turn out to be
problematically slow or not.

It basically calls `provided-mode-derived-p' for all annotated commands,
and this is a loop that chases mode parenthood back to its ultimate
ancestor.

It seems like this could done more efficiently by just resolving the
chain at `define-derived-mode' time.  That is, in addition to putting
`derived-mode-parent', it could put `derived-mode-parents', too, where
it chases the chain upwards.  Then we'd just have to look at a single
property list...

Does anybody see any disadvantages to doing it this way?  (This would
speed up `derived-mode-p', which we use all over Emacs, in general.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-15  2:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-14 20:22 A faster derived-mode-p Lars Ingebrigtsen
2021-02-14 22:25 ` Dmitry Gutov
2021-02-14 22:45   ` Basil L. Contovounesios
2021-02-14 23:03     ` Óscar Fuentes
2021-02-15  2:34     ` Dmitry Gutov
2021-02-15  2:47       ` Lars Ingebrigtsen
2021-02-14 23:51 ` Stefan Monnier
2021-02-15  2:56   ` Lars Ingebrigtsen

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.