From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74476: [PATCH] Explore JPEG loading without quantization Date: Sat, 30 Nov 2024 12:19:16 +0200 Message-ID: <86iks581nf.fsf@gnu.org> References: <871pz39v6p.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27358"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74476@debbugs.gnu.org To: Manuel Giraud , Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 30 11:20:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tHKaM-0006xG-7V for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Nov 2024 11:20:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHKa5-0006sK-3t; Sat, 30 Nov 2024 05:20:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHKa3-0006rt-54 for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 05:20:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tHKa2-0008Fz-Mz for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 05:20:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=ETZRJId4bvobjjjMTQyc81/BGjnmiQuEJe2AkGRG944=; b=vaakhNpOz5jfFY9rKh2tTEBsDe6Sxx9VVVYwBKyWVGI9ZyHYyl55ApElxP1eaZAv0fiIUvDGiiHR9II+m+ospcA1or5wgEXTlGdccNr2WBgC/0zGFT/T93kDUsJchjIpc0AJt25sYF6tQ16IwzIQ5Fryl4FHEAS8e3UJtoyqmW0wACRUPesYhT+h1OYTGlmQtLAkWdfCU78GUO6InFKO9N8iZFfA9GPtu58/n3qaAehw4bN2GPSpUEbikHKYAfrH3JLBnwIuzFlw3syJe7lHTvIysMkryrl1aeb9bem1gHtGbsvuFYf1N9C2M4Fv3vByXJpiwxG1P2aoCfqiG/DMRQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHKa2-00087J-JH for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 05:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Nov 2024 10:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74476 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74476-submit@debbugs.gnu.org id=B74476.173296197531136 (code B ref 74476); Sat, 30 Nov 2024 10:20:02 +0000 Original-Received: (at 74476) by debbugs.gnu.org; 30 Nov 2024 10:19:35 +0000 Original-Received: from localhost ([127.0.0.1]:45560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHKZb-000867-9E for submit@debbugs.gnu.org; Sat, 30 Nov 2024 05:19:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHKZZ-00085o-0t for 74476@debbugs.gnu.org; Sat, 30 Nov 2024 05:19:33 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHKZP-00082L-Ax; Sat, 30 Nov 2024 05:19:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ETZRJId4bvobjjjMTQyc81/BGjnmiQuEJe2AkGRG944=; b=IE+gXd20cBPQ TkWXGMXFnGPtzxrtzgzFXfSTNa6D+1IV0XHia6rybQDr8daVto/75fzcYj/J4FkFYqjAF3mm1PHlD BH68SlMlKhws3bgloav5VranSGjBOQBjKlIr5906MP9atzVIJ7132xWd8w+hWOaX3Io4UJ9sJnYJ6 AJFkSuVqKCDIqrnXwx4ZbUj4u5OOIWXXGMI1tl6jNgsTe539CuBaSVRbewtP7M65xZthe16uSHTUl Lud2Y1G3N2Q4xJswJdTnFRUIadAEFi6qDgrHlbcAg40wcLhq3TIZlzrym+1W/C61FwCQw8+jhX2BK B87rdxzPNW8leYisVp9Ffg==; In-Reply-To: <871pz39v6p.fsf@ledu-giraud.fr> (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296142 Archived-At: > Date: Fri, 22 Nov 2024 15:53:18 +0100 > From: Manuel Giraud via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > While trying to speed up "emacs as an image viewer", I found that emacs > is using libjpeg with color quantization and it seems that removing this > quantization could speed up JPEG loading a bit. > > My simple limited benchmark: > > - M-: (clear-image-cache) > - Open an image in folder with some large enough pictures in > it (4000x3000 here) > - M-: (benchmark-run 10 (image-next-file 1)) > > Here are the results I get: > > without this path: (5.415405491 1 0.09232176400000025) > with: (3.079911418 1 0.0751190459999993) > > I don't think that this patch could be applied as is (it is rather > ugly). And I also think that I probably have missed some (many?) use > case (where color quantization is mandatory). But I'm submitting this > patch anyway as a conversation starter on the subject. Alan, any comments? I know nothing about this "color quantization" aspect of JPEG images.