all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kirill Ignatiev <kirill.ignatiev@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 19266@debbugs.gnu.org
Subject: bug#19266: 24.4; Font-related window redrawing delays on OS X
Date: Thu, 4 Dec 2014 03:20:44 -0500	[thread overview]
Message-ID: <CACe-pWyty4-pPEtP=SLnJQ0m4Ep4X-hA0bhjWzenFLCsCC+Q2g@mail.gmail.com> (raw)
In-Reply-To: <83wq674zav.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]

On 4 December 2014 at 03:03, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Thu, 4 Dec 2014 02:41:34 -0500
>> From: Kirill Ignatiev <kirill.ignatiev@gmail.com>
>> Cc: 19266@debbugs.gnu.org
>
> Emacs releases unused font slots from time to time, which might be the
> reason here.
>
> But this is speculation; a reproducible recipe is required to
> investigate and come up with specifics.  And yes, it could be a bug.

Okay, here's one attempt to reproduce it (sorry about the length). The
idea is to view lots of files, then later viewing a buffer that was
previously displayed causes a delay.

1. Start with -Q.
2. Open file uncommon_symbols.txt (attached). There's a delay but it opens fine.
3. Select the entire file; there is another delay (presumably font for
selected region is loaded separately).
4. C-h h to view hello file. Scroll all the way down with C-v.
5. Mark entire hello file, scroll all the way up from bottom.
6. View src/font.c (in emacs source), scroll all the way down to
render the whole file.
7. Mark the entire file, scroll all the way up, to view the entire
file in selected color.

Now:
8. View uncommon_symbols.txt: no delay.
9. Mark the entire file: no delay again.
10. View hello file: there is a noticeable delay of a few seconds with
the stack trace attached below.

This delay is, I think, identical to what I sometimes experience. Also
the reproduction's length can maybe be reduced somehow. I don't think
viewing three unicode-rich files should lead to such a noticeable
redrawing delay.

It's not so much that the delay is terribly long, it's that it
interrupts typing and normal workflow.

[-- Attachment #2: uncommon_symbols_bt.txt --]
[-- Type: text/plain, Size: 6086 bytes --]

* thread #1: tid = 0x978a, 0x00007fff828f6a1a libsystem_kernel.dylib`mach_msg_trap + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007fff828f6a1a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff828f5d18 libsystem_kernel.dylib`mach_msg + 64
    frame #2: 0x00007fff8d8dc78d libFontRegistry.dylib`XTSendCopyPropertyForFonts + 227
    frame #3: 0x00007fff8d8f987c libFontRegistry.dylib`TGlobalFontRegistryImp::CopyPropertyForFonts(__CFArray const*, __CFString const*, TFontQueryOptions const&) const + 292
    frame #4: 0x00007fff8d8dc16f libFontRegistry.dylib`XTCopyPropertyForFonts + 115
    frame #5: 0x00007fff827f0817 CoreText`TBaseFont::CreateTraitsValuesPerFontInfo() const + 143
    frame #6: 0x00007fff827f068f CoreText`TBaseFont::CopyTraitsInternal() const + 87
    frame #7: 0x00007fff827f2e81 CoreText`TBaseFont::CreateTraitsValues() const + 29
    frame #8: 0x00007fff827f2e49 CoreText`TBaseFont::GetSymbolicTraitsInternal() const + 21
    frame #9: 0x00007fff827f2e17 CoreText`TBaseFont::GetSymbolicTraits(bool) const + 17
    frame #10: 0x00007fff8284fe56 CoreText`CompareLocalizedDescriptorsByTraitsAndPrecedence(void const*, void const*, void*, bool, bool) + 340
    frame #11: 0x00007fff8da10547 CoreFoundation`__CFSimpleMergeSort + 455
    frame #12: 0x00007fff8da10484 CoreFoundation`__CFSimpleMergeSort + 260
    frame #13: 0x00007fff8da10484 CoreFoundation`__CFSimpleMergeSort + 260
    frame #14: 0x00007fff8da1034b CoreFoundation`CFSortIndexes + 443
    frame #15: 0x00007fff8da10048 CoreFoundation`CFQSortArray + 232
    frame #16: 0x00007fff8da0fefe CoreFoundation`CFArraySortValues + 1054
    frame #17: 0x00007fff8284f008 CoreText`TDescriptorSource::CopyAllDescriptorsInternal(bool, CFComparisonResult (*)(void const*, void const*, void*)) const + 186
    frame #18: 0x00007fff8284f142 CoreText`TDescriptorSource::CopyAllDescriptorsSorted() const + 26
    frame #19: 0x00007fff827f5bfd CoreText`TDescriptor::CreateMatchingDescriptors(__CFSet const*, unsigned long) const + 249
    frame #20: 0x00007fff8283bf36 CoreText`CTFontDescriptorCreateMatchingFontDescriptors + 87
    frame #21: 0x00007fff86f2c521 AppKit`-[NSCTFontDescriptor matchingFontDescriptorsWithMandatoryKeys:] + 12
    frame #22: 0x00000001001c5d60 Emacs`ns_findfonts(font_spec=4345331237, isMatch='\0') + 1600 at nsfont.m:564
    frame #23: 0x000000010014ab10 Emacs`font_list_entities(f=0x0000000101065848, spec=4338851493) + 720 at font.c:2759
    frame #24: 0x000000010014cc33 Emacs`font_find_for_lface(f=0x0000000101065848, attrs=0x000000010a109f60, spec=<unavailable>, c=-1) + 1971 at font.c:3235
    frame #25: 0x00000001001985bb Emacs`fontset_find_font(fontset=4338292981, c=2870, face=0x000000010a109f60, id=<unavailable>, fallback=false) + 1755 at fontset.c:636
    frame #26: 0x0000000100194f13 Emacs`fontset_font(fontset=4471797549, c=2870, face=0x000000010a109f60, id=143) + 323 at fontset.c:754
    frame #27: 0x00000001001951a4 Emacs`font_for_char(face=0x000000010a109f60, c=2870, pos=<unavailable>, object=<unavailable>) + 260 at fontset.c:1023
    frame #28: 0x000000010014e4f7 Emacs`font_range(pos=<unavailable>, pos_byte=<unavailable>, limit=0x00007fff5fbf5a80, w=<unavailable>, face=<unavailable>, string=4328534074) + 903 at font.c:3774
    frame #29: 0x00000001001912dd Emacs`autocmp_chars(rule=4328841365, charpos=416, bytepos=542, limit=418, win=0x0000000101076c48, face=0x000000010a109f60, string=4328534074) + 349 at composite.c:900
    frame #30: 0x0000000100190f7a Emacs`composition_reseat_it(cmp_it=0x00007fff5fbf8020, charpos=416, bytepos=542, endpos=<unavailable>, w=0x0000000101076c48, face=0x000000010a109f60, string=140734799764272) + 634 at composite.c:1227
    frame #31: 0x0000000100053ac5 Emacs`next_element_from_buffer(it=0x00007fff5fbf77c8) + 357 at xdisp.c:8338
    frame #32: 0x000000010001a670 Emacs`get_next_display_element(it=0x00007fff5fbf77c8) + 48 at xdisp.c:6925
    frame #33: 0x00000001000284d8 Emacs`display_line(it=0x00007fff5fbf77c8) + 1304 at xdisp.c:20183
    frame #34: 0x0000000100027de6 Emacs`try_window(window=<unavailable>, flags=1, pos=<unavailable>) + 214 at xdisp.c:16972
    frame #35: 0x000000010004bb43 Emacs`redisplay_window(window=4312230989, just_this_one_p=false) + 13651 at xdisp.c:16451
    frame #36: 0x00000001000524f6 Emacs`redisplay_window_0(window=<unavailable>) + 38 at xdisp.c:14348
    frame #37: 0x0000000100138b34 Emacs`internal_condition_case_1(bfun=0x00000001000524d0, arg=4312230989, handlers=<unavailable>, hfun=<unavailable>) + 260 at eval.c:1372
    frame #38: 0x0000000100048554 Emacs`redisplay_windows(window=<unavailable>) + 180 at xdisp.c:14328
    frame #39: 0x0000000100026938 Emacs`redisplay_internal + 6184 at xdisp.c:13927
    frame #40: 0x00000001000c1a5e Emacs`read_char(commandflag=1, map=4497713446, prev_event=4328534074, used_mouse_menu=0x00007fff5fbff3df, end_time=0x0000000000000000) + 1982 at keyboard.c:2570
    frame #41: 0x00000001000bf0dc Emacs`read_key_sequence(bufsize=<unavailable>, keybuf=<unavailable>, prompt=<unavailable>, dont_downcase_last=<unavailable>, can_return_switch_frame=<unavailable>, fix_current_buffer=<unavailable>, prevent_redisplay=<unavailable>) + 1964 at keyboard.c:9088
    frame #42: 0x00000001000be6f0 Emacs`command_loop_1 + 4736 at keyboard.c:1452
    frame #43: 0x0000000100138a1b Emacs`internal_condition_case(bfun=0x00000001000bd470, handlers=<unavailable>, hfun=<unavailable>) + 251 at eval.c:1348
    frame #44: 0x00000001000ceb6e Emacs`command_loop_2(ignore=<unavailable>) + 62 at keyboard.c:1177
    frame #45: 0x00000001001383a3 Emacs`internal_catch(tag=<unavailable>, func=0x00000001000ceb30, arg=4328534074) + 243 at eval.c:1112
    frame #46: 0x00000001000bcaad Emacs`recursive_edit_1 [inlined] command_loop + 68 at keyboard.c:1156
    frame #47: 0x00000001000bca69 Emacs`recursive_edit_1 + 265 at keyboard.c:777
    frame #48: 0x00000001000bcbf2 Emacs`Frecursive_edit + 242 at keyboard.c:848
    frame #49: 0x00000001000bb7da Emacs`main(argc=0, argv=<unavailable>) + 5850 at emacs.c:1646

[-- Attachment #3: uncommon_symbols.txt --]
[-- Type: text/plain, Size: 1164 bytes --]


nil !: ¬
nil !=: ≢
nil /=: ≢
nil ==: ≡
nil &&: ∧
nil ||: ∨
nil not: ¬
nil and: ∧
nil or: ∨
nil >=: ≥
nil <=: ≤
nil ->: →
nil <-: ←
nil ~: ∼
nil ::: ∷
nil ->: →
nil nullptr: ∅
nil null: ∅
nil NULL: ∅
nil None: ∅
nil undefined: ⟂
nil -<: ⤙
nil >-: ⤚
nil <*>: ⊛
nil >>: ≫
nil <<: ≪
nil >>=: ⤜
nil =<<: ⤛
nil >>>: ⋙
nil <<<: ⋘
nil ***: ⁂
nil ++: ⧺
nil +++: ⧻
nil |||: ⫴
nil elem: ∈
nil notElem: ∉
nil union: ∪
nil intersect: ∩
nil msum: ⊕
nil Integer: ℤ
nil Ratio Integer: ℚ
nil Double: ℝ
nil Bool: 𝔹
nil Gamma: Γ
nil Delta: Δ
nil Theta: Θ
nil Lambda: Λ
nil Xi: Ξ
nil Pi: Π
nil Sigma: Σ
nil Upsilon: ϒ
nil Phi: Φ
nil Psi: Ψ
nil Omega: Ω
nil alpha: α
nil beta: β
nil gamma: γ
nil delta: δ
nil epsilon: ε
nil zeta: ζ
nil eta: η
nil theta: θ
nil vartheta: ϑ
nil kappa: κ
nil lambda: λ
nil mu: μ
nil nu: ν
nil xi: ξ
nil pi: π
nil varpi: ϖ
nil rho: ρ
nil varrho: ϱ
nil varsigma: ς
nil sigma: σ
nil tau: τ
nil upsilon: υ
nil phi: ϕ
nil varphi: φ
nil chi: χ
nil psi: ψ
nil omega: ω
nil RussianR: Я
nil RussianZ: З
nil RussianZH: Ж
nil RussianE: Э

  reply	other threads:[~2014-12-04  8:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04  7:13 bug#19266: 24.4; Font-related window redrawing delays on OS X Kirill Ignatiev
2014-12-04  7:30 ` Eli Zaretskii
2014-12-04  7:41   ` Kirill Ignatiev
2014-12-04  8:03     ` Eli Zaretskii
2014-12-04  8:20       ` Kirill Ignatiev [this message]
2014-12-04  9:55   ` Sebastian Wiesner
2014-12-04 10:17     ` Eli Zaretskii
2014-12-04 10:19       ` Sebastian Wiesner
2014-12-07  5:50         ` Kirill Ignatiev
2014-12-07 16:09           ` Eli Zaretskii
2014-12-10 23:50             ` Kirill Ignatiev
2014-12-11 17:45               ` Eli Zaretskii
2014-12-12  2:10                 ` Kirill Ignatiev
2014-12-12  8:06                   ` Eli Zaretskii
2014-12-17  1:35                     ` Kirill Ignatiev
2014-12-17  2:13                       ` Kirill Ignatiev
2014-12-12  8:29                   ` Sebastian Wiesner
2014-12-12  9:33                     ` Kirill Ignatiev
2014-12-12 10:56                       ` Eli Zaretskii
2022-04-30 15:44 ` Lars Ingebrigtsen
2022-05-02 16:22   ` Kirill Ignatiev
2022-05-03  9:05     ` Lars Ingebrigtsen

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='CACe-pWyty4-pPEtP=SLnJQ0m4Ep4X-hA0bhjWzenFLCsCC+Q2g@mail.gmail.com' \
    --to=kirill.ignatiev@gmail.com \
    --cc=19266@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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.