GNU bug report logs - #79774
[PATCH] [NS] Image type cache

Previous Next

Package: emacs;

Reported by: Przemysław Alexander Kamiński <alexander <at> kaminski.se>

Date: Wed, 5 Nov 2025 18:47:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 79774 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#79774; Package emacs. (Wed, 05 Nov 2025 18:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Przemysław Alexander Kamiński <alexander <at> kaminski.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 05 Nov 2025 18:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Przemysław Alexander Kamiński
 <alexander <at> kaminski.se>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] [NS] Image type cache
Date: Wed, 05 Nov 2025 19:46:08 +0100
[Message part 1 (text/plain, inline)]
This patch makes image type dictionary cache which prevents doing
NSString allocations on every image type checks (around 40-60KiB per
type check).

This patch is stable, I've been using it for >2 months without any issues.
-- 
Przemysław Alexander Kamiński (vel xlii vel exlee)
https://xlii.space  ||  https://codeberg.org/exlee

[ns_native_api_dict_0003.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79774; Package emacs. (Wed, 05 Nov 2025 18:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 79774 <at> debbugs.gnu.org (full text, mbox):

From: Stéphane Marks <shipmints <at> gmail.com>
To: Przemysław Alexander Kamiński <alexander <at> kaminski.se>
Cc: 79774 <at> debbugs.gnu.org
Subject: Re: bug#79774: [PATCH] [NS] Image type cache
Date: Wed, 5 Nov 2025 13:52:14 -0500
[Message part 1 (text/plain, inline)]
On Wed, Nov 5, 2025 at 1:47 PM Przemysław Alexander Kamiński <
alexander <at> kaminski.se> wrote:

> This patch makes image type dictionary cache which prevents doing
> NSString allocations on every image type checks (around 40-60KiB per
> type check).
>
> This patch is stable, I've been using it for >2 months without any issues.
>

Ditto on sensible cache invalidation logic of some kind.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79774; Package emacs. (Wed, 05 Nov 2025 19:40:01 GMT) Full text and rfc822 format available.

Message #11 received at 79774 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Przemysław Alexander Kamiński
 <alexander <at> kaminski.se>, Alan Third <alan <at> idiocy.org>
Cc: 79774 <at> debbugs.gnu.org
Subject: Re: bug#79774: [PATCH] [NS] Image type cache
Date: Wed, 05 Nov 2025 21:39:03 +0200
> From: Przemysław Alexander Kamiński
>  <alexander <at> kaminski.se>
> Date: Wed, 05 Nov 2025 19:46:08 +0100
> 
> This patch makes image type dictionary cache which prevents doing
> NSString allocations on every image type checks (around 40-60KiB per
> type check).

Thanks.  Alan, any comments or suggestions?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79774; Package emacs. (Fri, 07 Nov 2025 16:35:02 GMT) Full text and rfc822 format available.

Message #14 received at 79774 <at> debbugs.gnu.org (full text, mbox):

From: Rudolf Adamkovič <rudolf <at> adamkovic.org>
To: Przemysław Alexander Kamiński
 <alexander <at> kaminski.se>, 79774 <at> debbugs.gnu.org
Subject: Re: bug#79774: [PATCH] [NS] Image type cache
Date: Fri, 07 Nov 2025 17:33:52 +0100
Przemysław Alexander Kamiński <alexander <at> kaminski.se> writes:

> +  CFDictionaryGetValueIfPresent(image_api_dict, type,
                                 ^^^
                                space
                                 :-)

Rudy
-- 
"It is better to have 100 functions operate on one data structure than
10 functions on 10 data structures."

--- Alan Perlis

Rudolf Adamkovič <rudolf <at> adamkovic.org> [he/him]
http://adamkovic.org




This bug report was last modified 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.