From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kirill Ignatiev Newsgroups: gmane.emacs.bugs Subject: bug#19266: 24.4; Font-related window redrawing delays on OS X Date: Tue, 16 Dec 2014 20:35:30 -0500 Message-ID: References: <83y4qn50ua.fsf@gnu.org> <957C7241-1F90-42A3-83DE-4696B483C1F0@lunaryorn.com> <83ppbz4t3f.fsf@gnu.org> <83fvcrzbku.fsf@gnu.org> <8361dit70g.fsf@gnu.org> <83iohhs35v.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1418780261 980 80.91.229.3 (17 Dec 2014 01:37:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2014 01:37:41 +0000 (UTC) Cc: Dmitry Antipov , Sebastian Wiesner , 19266@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 17 02:37:33 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y13XE-00013q-6g for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Dec 2014 02:36:16 +0100 Original-Received: from localhost ([::1]:47471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y13XD-0007g6-MA for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Dec 2014 20:36:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y13X5-0007fl-Hd for bug-gnu-emacs@gnu.org; Tue, 16 Dec 2014 20:36:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y13X0-0002MM-Mg for bug-gnu-emacs@gnu.org; Tue, 16 Dec 2014 20:36:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y13X0-0002MF-JV for bug-gnu-emacs@gnu.org; Tue, 16 Dec 2014 20:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y13X0-0007dA-3i for bug-gnu-emacs@gnu.org; Tue, 16 Dec 2014 20:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kirill Ignatiev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Dec 2014 01:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19266 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19266-submit@debbugs.gnu.org id=B19266.141878013429294 (code B ref 19266); Wed, 17 Dec 2014 01:36:02 +0000 Original-Received: (at 19266) by debbugs.gnu.org; 17 Dec 2014 01:35:34 +0000 Original-Received: from localhost ([127.0.0.1]:48285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y13WX-0007cP-LM for submit@debbugs.gnu.org; Tue, 16 Dec 2014 20:35:33 -0500 Original-Received: from mail-wg0-f44.google.com ([74.125.82.44]:38697) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y13WV-0007cD-GF for 19266@debbugs.gnu.org; Tue, 16 Dec 2014 20:35:32 -0500 Original-Received: by mail-wg0-f44.google.com with SMTP id b13so19050099wgh.31 for <19266@debbugs.gnu.org>; Tue, 16 Dec 2014 17:35:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uYDhc/yiWs09eI2XyCal6nC0PpIEwdlkhwVQRi/ovg8=; b=nWkdToO5JdxnvqinuyvgUoioOyZuUa5rvPRSr74oUO0kS70HJ1WbI3O3R9/G+1QdK3 zyGLSs2OfZIzAFfeqvk3+XXWigj8wYJoZ9LYRN8/W5Hjr2y2pH3RN9RyGMWfoSvikWRq 04fPSvrAZvc7k+msMA6I3tP5bS4OwqiFFU/bgEHRFeajCw9IrgMSEUvCLfn9Wx/tMACl iAEt0eHquBQuhbfDGBt+nW7YM3D8X0GS3BhLkN1DuyhRdoJiUVr6c9fSYe+muZk5EMZW cH9bR87hXxlODMG+sde8XhK66HzpaOHGRutA0ugoL1E3oLrmwqAUt2C2ROU0ZBMy+XsU DyAQ== X-Received: by 10.180.88.33 with SMTP id bd1mr9521141wib.10.1418780130917; Tue, 16 Dec 2014 17:35:30 -0800 (PST) Original-Received: by 10.27.87.87 with HTTP; Tue, 16 Dec 2014 17:35:30 -0800 (PST) In-Reply-To: <83iohhs35v.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97425 Archived-At: On 12 December 2014 at 03:06, Eli Zaretskii wrote: > Look up the call chain (best done by setting a breakpoint and looking > at the backtrace), and you will certainly find a place which decides > to discard them. Then comment out or change the code which does that. > > ... > > Again, look at the backtrace at a breakpoint in cleanup_vector and in > compact_font_cache_entry. Isn't there some GC-related function on the > callstack? Perhaps post that here, if you cannot figure that out. The top function is garbage_collect, but whatever leads it to close the fonts isn't triggered by a manual call to garbage-collect in emacs. Also: if the garbage collector isn't wrong, the fact that font entities are garbage means that it really is okay to close them: they wouldn't be accessible to all the other code anyway. I don't quite understand how font_open_entity decides to load a font against using a cache, but making sure fonts remain accessible to the call path face_for_char -> fontset_font -> fontset_find_font -> font_open_entity is probably the thing to do. Setting compact_font_cache_entry to a noop doesn't seem to do the trick, font_open_entity gets called too many times anyway, if I'm not mistaken.