From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#38345: 27.0.50; Permanent increase in memory consumption after opening images (or pdfs) Date: Sat, 23 Nov 2019 22:37:44 +0800 Message-ID: <87sgme1ww7.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="144630"; mail-complaints-to="usenet@blaine.gmane.org" To: 38345@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 23 15:40:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iYWa3-000bTU-Hb for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Nov 2019 15:40:11 +0100 Original-Received: from localhost ([::1]:59236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYWa2-0001Mv-7r for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Nov 2019 09:40:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48323) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYWZx-0001Mn-2l for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:40:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iYWZv-00079f-Ue for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:40:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47220) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iYWZv-00079W-Rj for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:40:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iYWZv-0001aC-LK for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:40:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Nov 2019 14:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38345 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15745199896049 (code B ref -1); Sat, 23 Nov 2019 14:40:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Nov 2019 14:39:49 +0000 Original-Received: from localhost ([127.0.0.1]:56041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYWZe-0001ZT-PI for submit@debbugs.gnu.org; Sat, 23 Nov 2019 09:39:49 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:50450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYWZP-0001Yz-RN for submit@debbugs.gnu.org; Sat, 23 Nov 2019 09:39:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48301) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYWZO-0001EZ-HM for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:39:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iYWZN-0006xo-9U for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:39:30 -0500 Original-Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:40204) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iYWZN-0006w3-2F for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2019 09:39:29 -0500 Original-Received: by mail-pj1-x1033.google.com with SMTP id ep1so4455677pjb.7 for ; Sat, 23 Nov 2019 06:39:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=V/j4cSYB84xh8bN+wNMuyCZLYOdAyry/eNyiqYv9M+s=; b=Bv4ZqsMM4MGMiycpyP2N6WcyGdnYdHksJGmsj2C9acZZA8sklyIwmtVWhBe5v2YOE2 KDIE7nIrCAJGNg1aU2ETlL3Y4aMnwXRNSfYNaN1aH3XEVZ8bQ/s3253Zv7tMHBR82Bs/ GyrNQ8c+jsq6Knr4lCR/I1jEiqZHgGqjP4afQnR+nfXJiJ2JCplWnIr25ji3pXxJAIGQ wwj1Fv6v1dTUDnLef8Fgv06bbl90fjuORg+EAuIrXNiZi/wsv0q7QAbhWsBBFS7D5YEF osxhbKPkfIa42ZSCTzZY723aS467u50nWKmy2wacxlPKsDbOxabQcc2uDK0LcnYgtsxH rK7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=V/j4cSYB84xh8bN+wNMuyCZLYOdAyry/eNyiqYv9M+s=; b=UGQXM/KEnZxeoqNxrntjT/MtlzJEHmMGbV/7xiACS5U9N3yavI8Y4yf7k3QE/hRPbD omWBLOhaLP+XxHYgKq9I7hkD+eoEVa8Ltr2qHO2QFLmj7+psLJNNWArikKQQxJuQkc2S WWzwIApa3w+6KJMrH5xx1Xd0O5QTGBWquhN1z17cAEfGoTBJUpiUyJ5gwxa1js8e/WJh YrBBs/T9rNKLVr3xrCyjGUB+pO3+KzfMijbTIZdjofXwb3HiS5vxUOmohll3TQbudhkd wooq026wX1J9IOTWCnDVw4gxoFOFIMsbF8p6ssJu2lI9lQuCfl4+bROFD6dEpRx6XGTg QUEw== X-Gm-Message-State: APjAAAX6MrMGnteEDU1lF/PtFMOdOc8HF1P66aFcpZ/UehKdra40KyDy 7d82Sq68aD9GwbH/FdUZrHeAf0kGoSE= X-Google-Smtp-Source: APXvYqxQGx+tkpG1441JIP7J/tfqUnTbSinJ8IoLBtC4wtmhJluYbTEK30+yqGKnUYN+0A0uayi/qQ== X-Received: by 2002:a17:902:9a8b:: with SMTP id w11mr19751068plp.9.1574519966835; Sat, 23 Nov 2019 06:39:26 -0800 (PST) Original-Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id f35sm2220682pje.32.2019.11.23.06.39.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Nov 2019 06:39:26 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:172303 Archived-At: Recently, I have noticed that my emacs tends to increase its memory usage up to over 1.5Gb after I open a large number of pdf documents. It is understandable since some of the pdfs can be quite large. However, the problem is that the memory does not seem to be released even after I close all the pdf buffers. First, I though that the issue is with pdf-tools and reported my problem there (https://github.com/politza/pdf-tools/issues/177). However, the memory consumption problem appears to happen even if I just open images. I monitored emacs (emacs -Q) memory usage with https://github.com/dkogan/memory_leak_instrumentation If I open a large (>250) photos using the code below, the memory usage increases permanently even after I close all the image buffers and wait for some time. #+begin_src emacs-lisp (setq large-file-warning-threshold nil) (setq image-cache-eviction-delay 5) (find-file "~/Tosort/pictures&photos/*.jpg" 'wild) (mapc #'kill-buffer (seq-filter (apply-partially #'string-match ".+.jpg$") (mapcar #'buffer-name (buffer-list)))) (clear-image-cache t) (garbage-collect) #+end_src The attached is memory consumption plot I got after running M-x eval-buffer on the code above several times (each run correspond to the memory consumption peak on the plot). Regards, Ihor in GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0) of 2019-11-21 built on yantar92-laptop Repository revision: 1805b4cc08c8f9668f0f43f5b157d91b9c757e88 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12005000 System Description: Gentoo/Linux