all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: eller.helmut@gmail.com, emacs-devel@gnu.org
Subject: Re: MPS: face-cache
Date: Sun, 28 Apr 2024 13:43:16 +0300	[thread overview]
Message-ID: <86jzkhu5rv.fsf@gnu.org> (raw)
In-Reply-To: <m2zftdc0h8.fsf@pro2.fritz.box> (message from Gerd Möllmann on Sun, 28 Apr 2024 11:14:59 +0200)

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel missing value
>  <emacs-devel@gnu.org>
> Date: Sun, 28 Apr 2024 11:14:59 +0200
> 
> Anyway. Eli can probably tell us how struct composition is used. If it
> has to do with character composition, I think Eli once told that is
> also something "new" (for me).

Yes, it's used for character compositions.

But I don't see the 'font' field of 'struct composition' used
anywhere.  I only see it being set to NULL and not accessed anywhere
else.  The font we use for composed characters is obtained "by other
means", via the lispy LGSTRING object.

As for 'key', it is indeed used to look up known compositions.  Each
composition, once it's computed, is cached in a hash table, to avoid
computing it again (because that can be expensive):

  /* Check if the same composition has already been registered or not
     by consulting composition_hash_table.  The key for this table is
     COMPONENTS (converted to a vector COMPONENTS-VEC) or, if it is
     nil, vector of characters in the composition range.  */
  if (FIXNUMP (components))
    key = make_vector (1, components);
  else if (STRINGP (components) || CONSP (components))
    key = Fvconcat (1, &components);
  else if (VECTORP (components))
    key = components;
  else if (NILP (components))
    {
      key = make_uninit_vector (nchars);
      if (STRINGP (string))
	for (ptrdiff_t i = 0; i < nchars; i++)
	  {
	    ch = fetch_string_char_advance (string, &charpos, &bytepos);
	    ASET (key, i, make_fixnum (ch));
	  }
      else
	for (ptrdiff_t i = 0; i < nchars; i++)
	  {
	    ch = fetch_char_advance (&charpos, &bytepos);
	    ASET (key, i, make_fixnum (ch));
	  }
    }
  else
    goto invalid_composition;

  hash_hash_t hash_code;
  hash_index = hash_lookup_get_hash (hash_table, key, &hash_code);
  if (hash_index >= 0)
    {
      /* We have already registered the same composition.  Change PROP
	 from Form-A above to Form-B while replacing COMPONENTS with
	 COMPONENTS-VEC stored in the hash table.  We can directly
	 modify the cons cell of PROP because it is not shared.  */
      key = HASH_KEY (hash_table, hash_index);
      id = HASH_VALUE (hash_table, hash_index);
      XSETCAR (prop, id);
      XSETCDR (prop, Fcons (make_fixnum (nchars), Fcons (key, XCDR (prop))));
      return XFIXNUM (id);
    }



  parent reply	other threads:[~2024-04-28 10:43 UTC|newest]

Thread overview: 234+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-27 20:20 MPS: face-cache Gerd Möllmann
2024-04-28  5:06 ` Gerd Möllmann
2024-04-28  5:58   ` Gerd Möllmann
2024-04-28  6:09   ` Eli Zaretskii
2024-04-28  6:28     ` Gerd Möllmann
2024-04-28  6:45       ` Eli Zaretskii
2024-04-28  6:50         ` Gerd Möllmann
2024-04-28  7:37       ` Eli Zaretskii
2024-04-28  7:41         ` Gerd Möllmann
2024-04-28  6:50   ` Helmut Eller
2024-04-28  6:53     ` Gerd Möllmann
2024-04-28  6:58       ` Helmut Eller
2024-04-28  6:59         ` Gerd Möllmann
2024-04-28  7:10           ` Gerd Möllmann
2024-04-28  7:22             ` Gerd Möllmann
2024-04-28  7:29               ` Eli Zaretskii
2024-04-28  7:38                 ` Gerd Möllmann
2024-04-28  7:56                   ` Eli Zaretskii
2024-04-28  8:05                     ` Gerd Möllmann
2024-04-28  8:13                       ` Eli Zaretskii
2024-04-28  8:18                         ` Gerd Möllmann
2024-04-28  8:23                     ` Po Lu
2024-04-28  8:45                       ` Eli Zaretskii
2024-04-28  8:22                   ` Po Lu
2024-04-28  8:29                     ` Gerd Möllmann
2024-04-28  8:35                       ` Gerd Möllmann
2024-04-28  8:41                       ` Po Lu
2024-04-28  8:43                         ` Gerd Möllmann
2024-04-28  8:55                         ` Gerd Möllmann
2024-04-28  7:55                 ` Gerd Möllmann
2024-04-28  7:58                   ` Eli Zaretskii
2024-04-28  8:04               ` Helmut Eller
2024-04-28  8:08                 ` Gerd Möllmann
2024-04-28  8:52               ` Helmut Eller
2024-04-28  8:59                 ` Gerd Möllmann
2024-04-28  9:04                   ` Helmut Eller
2024-04-28  9:14                     ` Gerd Möllmann
2024-04-28  9:26                       ` Helmut Eller
2024-04-28  9:34                         ` Gerd Möllmann
2024-04-28  9:40                           ` Helmut Eller
2024-04-28 10:11                             ` Gerd Möllmann
2024-04-28 10:17                         ` Eli Zaretskii
2024-04-28 10:20                           ` Gerd Möllmann
2024-04-28 10:43                       ` Eli Zaretskii [this message]
2024-04-28 12:23                         ` Gerd Möllmann
2024-04-28 12:26                           ` Gerd Möllmann
2024-04-28 12:59                             ` Helmut Eller
2024-04-28 13:55                               ` Eli Zaretskii
2024-04-28 14:06                               ` Gerd Möllmann
2024-04-28 14:30                                 ` Gerd Möllmann
2024-04-29  7:15                                 ` Helmut Eller
2024-04-29  7:52                                   ` Gerd Möllmann
2024-04-29  8:03                                     ` Helmut Eller
2024-04-29  8:21                                       ` Gerd Möllmann
2024-04-29  8:37                                       ` Eli Zaretskii
2024-04-29  8:41                                         ` Gerd Möllmann
2024-04-29  8:54                                         ` Helmut Eller
2024-04-29 11:05                                           ` Eli Zaretskii
2024-04-29 11:18                                             ` Gerd Möllmann
2024-04-29 11:41                                               ` Eli Zaretskii
2024-04-29 13:07                                             ` Helmut Eller
2024-04-29 13:22                                               ` Eli Zaretskii
2024-04-29 13:38                                                 ` Helmut Eller
2024-04-29 13:57                                                   ` Eli Zaretskii
2024-04-29 15:19                                                 ` Helmut Eller
2024-04-29 15:32                                                   ` Eli Zaretskii
2024-04-29 15:37                                                     ` Eli Zaretskii
2024-04-29  8:39                                   ` Eli Zaretskii
2024-04-29  8:42                                     ` Gerd Möllmann
2024-04-29 13:13                                   ` Po Lu
2024-04-29 18:47                                   ` Gerd Möllmann
2024-04-29 19:15                                     ` Helmut Eller
2024-04-29 19:36                                       ` Gerd Möllmann
2024-04-30  5:52                                         ` Helmut Eller
2024-04-30  6:04                                           ` Gerd Möllmann
2024-04-30  6:36                                             ` MPS: staticpro everything Helmut Eller
2024-04-30  6:54                                               ` Gerd Möllmann
2024-04-30 18:57                                                 ` Helmut Eller
2024-04-30 19:10                                                   ` Gerd Möllmann
2024-04-30 19:22                                                   ` Eli Zaretskii
2024-05-01  6:47                                                     ` Gerd Möllmann
2024-05-01  7:33                                                       ` Helmut Eller
2024-05-01  7:46                                                         ` Gerd Möllmann
2024-05-01 12:15                                                       ` Eli Zaretskii
2024-05-01  6:53                                                     ` Helmut Eller
2024-05-01 13:06                                                       ` Eli Zaretskii
2024-05-01 13:48                                                         ` Gerd Möllmann
2024-05-01 14:02                                                           ` Eli Zaretskii
2024-05-01 14:08                                                         ` Helmut Eller
2024-05-01 14:20                                                           ` Gerd Möllmann
2024-05-01 15:02                                                           ` Eli Zaretskii
2024-05-01 16:06                                                             ` Helmut Eller
2024-05-02  8:01                                                               ` Eli Zaretskii
2024-05-02  9:04                                                                 ` Gerd Möllmann
2024-05-02 11:09                                                                   ` Eli Zaretskii
2024-05-02 12:01                                                                     ` Gerd Möllmann
2024-05-02 12:10                                                                       ` Eli Zaretskii
2024-05-02 12:30                                                                         ` Gerd Möllmann
2024-05-02 13:25                                                                           ` Po Lu
2024-05-02 14:01                                                                             ` Gerd Möllmann
2024-05-02 15:02                                                                               ` Eli Zaretskii
2024-05-02 15:37                                                                                 ` Gerd Möllmann
2024-05-02 16:09                                                                                   ` Eli Zaretskii
2024-05-02 19:08                                                                                     ` Gerd Möllmann
2024-05-03  7:03                                                                                       ` Eli Zaretskii
2024-05-03  7:30                                                                                         ` Gerd Möllmann
2024-05-03 11:18                                                                                           ` Helmut Eller
2024-05-03 11:29                                                                                             ` Eli Zaretskii
2024-05-03 11:49                                                                                               ` Gerd Möllmann
2024-05-03 12:01                                                                                                 ` Eli Zaretskii
2024-05-03 12:21                                                                                                   ` Gerd Möllmann
2024-05-03 13:39                                                                                                     ` Eli Zaretskii
2024-05-03 11:47                                                                                             ` Gerd Möllmann
2024-05-02 15:12                                                                           ` Eli Zaretskii
2024-05-02 15:55                                                                             ` Gerd Möllmann
2024-05-02 16:45                                                                               ` Eli Zaretskii
2024-05-02 19:10                                                                                 ` Gerd Möllmann
2024-05-02 15:09                                                                 ` Helmut Eller
2024-05-02 15:46                                                                   ` Gerd Möllmann
2024-05-02 16:03                                                                     ` Helmut Eller
2024-05-02 16:48                                                                       ` Eli Zaretskii
2024-05-02 18:30                                                                       ` Gerd Möllmann
2024-05-02 18:46                                                                       ` Eli Zaretskii
2024-05-02 19:01                                                                         ` Eli Zaretskii
2024-05-02 19:19                                                                           ` Gerd Möllmann
2024-05-02 19:51                                                                           ` Gerd Möllmann
2024-05-03  5:27                                                                             ` Eli Zaretskii
2024-05-03  5:44                                                                               ` Gerd Möllmann
2024-05-02 19:18                                                                         ` Gerd Möllmann
2024-05-02 18:49                                                                       ` Eli Zaretskii
2024-05-03  5:32                                                                         ` Gerd Möllmann
2024-05-03  6:26                                                                         ` MPS: GUI test automation (was: MPS: staticpro everything) Helmut Eller
2024-05-03  7:17                                                                           ` Eli Zaretskii
2024-05-03  7:18                                                                           ` MPS: GUI test automation Gerd Möllmann
2024-05-02 16:24                                                                   ` MPS: staticpro everything Eli Zaretskii
2024-05-01  6:05                                                   ` Gerd Möllmann
2024-05-01  7:32                                                     ` Helmut Eller
2024-05-01  7:46                                                       ` Gerd Möllmann
2024-05-01  8:03                                                         ` Gerd Möllmann
2024-05-01  8:25                                                           ` Helmut Eller
2024-05-01  8:48                                                             ` Gerd Möllmann
2024-05-01  9:42                                                               ` Helmut Eller
2024-05-01 12:24                                                               ` Eli Zaretskii
2024-05-01 16:45                                                           ` Helmut Eller
2024-05-01 17:02                                                             ` Gerd Möllmann
2024-05-01 13:12                                                         ` Eli Zaretskii
2024-05-01 13:54                                                           ` Gerd Möllmann
2024-05-01 12:50                                                     ` MPS GC and its implications (was: staticpro everything) Eli Zaretskii
2024-05-01 13:39                                                       ` MPS GC and its implications Gerd Möllmann
2024-05-01 14:52                                                         ` Eli Zaretskii
2024-05-01 15:51                                                           ` Gerd Möllmann
2024-05-01 16:48                                                             ` Eli Zaretskii
2024-05-01 17:17                                                               ` Gerd Möllmann
2024-05-01 17:52                                                                 ` Eli Zaretskii
2024-05-01 13:43                                                       ` Helmut Eller
2024-05-01 14:05                                                         ` Gerd Möllmann
2024-05-01 14:58                                                           ` Eli Zaretskii
2024-05-01 15:54                                                             ` Gerd Möllmann
2024-05-01 16:49                                                               ` Eli Zaretskii
2024-05-01 17:19                                                                 ` Gerd Möllmann
2024-05-01 17:38                                                                   ` Helmut Eller
2024-05-01 17:56                                                                     ` Eli Zaretskii
2024-05-01 18:01                                                                       ` Helmut Eller
2024-05-01 18:07                                                                         ` Gerd Möllmann
2024-05-01 18:24                                                                           ` Eli Zaretskii
2024-05-01 18:41                                                                           ` Helmut Eller
2024-05-01 19:12                                                                             ` Gerd Möllmann
2024-05-02  6:03                                                                               ` Eli Zaretskii
2024-05-01 18:23                                                                         ` Eli Zaretskii
2024-05-01 17:53                                                                   ` Eli Zaretskii
2024-05-01 17:59                                                                     ` Gerd Möllmann
2024-05-01 18:20                                                                       ` Eli Zaretskii
2024-05-01 19:06                                                                         ` Gerd Möllmann
2024-05-02  8:30                                                                           ` Eli Zaretskii
2024-05-02  9:05                                                                             ` Gerd Möllmann
2024-05-02 21:25                                                         ` Andrea Corallo
2024-05-03  5:42                                                           ` Gerd Möllmann
2024-05-03 11:18                                                             ` Eli Zaretskii
2024-05-03 11:32                                                               ` Helmut Eller
2024-05-03 11:54                                                                 ` Eli Zaretskii
2024-05-03 11:59                                                                   ` Gerd Möllmann
2024-05-03 12:05                                                                     ` Eli Zaretskii
2024-05-03 12:27                                                                       ` Gerd Möllmann
2024-05-03 13:44                                                                         ` Andrea Corallo
2024-05-03 14:22                                                                           ` Gerd Möllmann
2024-05-03 12:28                                                                   ` Helmut Eller
2024-05-03 13:33                                                                     ` Eli Zaretskii
2024-05-03 13:57                                                                       ` Helmut Eller
2024-05-03 15:56                                                                         ` Eli Zaretskii
2024-05-03 19:18                                                                           ` Eli Zaretskii
2024-05-04  4:22                                                                             ` Helmut Eller
2024-05-04  7:43                                                                               ` Eli Zaretskii
2024-05-04  7:57                                                                                 ` Gerd Möllmann
2024-05-04  9:01                                                                                   ` Eli Zaretskii
2024-05-04  9:39                                                                                 ` Helmut Eller
2024-05-04  9:56                                                                                   ` Mattias Engdegård
2024-05-04 10:07                                                                                     ` Helmut Eller
2024-05-04 10:29                                                                                       ` Mattias Engdegård
2024-05-04 12:34                                                                                   ` Eli Zaretskii
2024-05-04 16:08                                                                                     ` Helmut Eller
2024-05-04 18:02                                                                                       ` Gerd Möllmann
2024-05-03 11:54                                                                 ` Gerd Möllmann
2024-05-03 13:40                                                             ` Andrea Corallo
2024-05-03 13:48                                                               ` Gerd Möllmann
2024-05-04  6:25                                                                 ` Andrea Corallo
2024-05-04  8:00                                                                   ` Eli Zaretskii
2024-04-30 11:35                                             ` MPS: face-cache Eli Zaretskii
2024-04-30 12:57                                               ` Gerd Möllmann
2024-04-30 13:17                                                 ` Eli Zaretskii
2024-04-30 13:43                                                   ` Gerd Möllmann
2024-04-30 11:09                                         ` Eli Zaretskii
2024-04-30 12:41                                           ` Gerd Möllmann
2024-05-02  9:49                                             ` Eli Zaretskii
2024-05-02 10:39                                               ` Gerd Möllmann
2024-05-02 15:10                                                 ` Helmut Eller
2024-05-02 18:28                                                   ` MPS: pdump Gerd Möllmann
2024-05-02 19:13                                                     ` Eli Zaretskii
2024-05-02 19:45                                                       ` Gerd Möllmann
2024-05-03  6:29                                                         ` Eli Zaretskii
2024-05-03  7:15                                                           ` Gerd Möllmann
2024-05-03 11:24                                                             ` Eli Zaretskii
2024-05-03 11:55                                                               ` Gerd Möllmann
2024-05-03 12:03                                                                 ` Eli Zaretskii
2024-05-03 12:23                                                                   ` Gerd Möllmann
2024-05-03  5:54                                                     ` Helmut Eller
2024-05-03  6:18                                                       ` Gerd Möllmann
2024-05-03  7:28                                                       ` Eli Zaretskii
2024-04-29 19:37                                     ` MPS: face-cache Helmut Eller
2024-04-29 19:39                                       ` Gerd Möllmann
2024-04-30 11:11                                       ` Eli Zaretskii
2024-04-30 12:42                                         ` Gerd Möllmann
2024-04-28 14:07                             ` Eli Zaretskii
2024-04-28 14:31                               ` Gerd Möllmann
2024-04-28  7:36         ` Eli Zaretskii

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=86jzkhu5rv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    /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.