performance: gtk slow in editing long strings?
hi, I'm new here, pls. be tolerant with fails,
( I even don't know the difference(s) between gtk, gtk2, gtk3, gtk+, gtk4 ...
thus evtl. the wrong place to ask here? )
I spotted an issue in gnumeric - issue #722 - performance: editing long strings ,
which the maintainer boiled down to:
'Unfortunately this is inside gtk.', and
'GtkEntry is spending a lot of time managing UTF-8 here.'
As I can imagine such may harm plenty of other applications
I'd consider it a good idea if someone with skills and knowledge
has a look on it. Perhaps it's a simple problem / fix?
TIA for any hints / help.
-
Information about your system. For instance:
- which version of GTK you are using - can't say, think it's pulled with build-dep for gnumeric,
- what operating system and version - Linux kali 5.14.0-kali4-amd64 #1 (closed) SMP Debian 5.14.16-1kali1 (2021-11-05) x86_64 GNU/Linux
- for Linux, which distribution - Kali Linux,
- if you built GTK, the list of options used to configure the build - can't say how and when it was pulled in or was by default,
And anything else you think is relevant.
-
How to reproduce the bug. - Steps I know would need to install gnumeric, and follow the report linked above.
If you can reproduce it with one of the demo applications that are built in the demos/ subdirectory, on one of the test programs that are built in the tests/ subdirectory, that will be most convenient. Otherwise, please include a short test program that exhibits the behavior. As a last resort, you can also provide a pointer to a larger piece of software that can be downloaded. - looks as if demo program not available on my system.
-
If the bug was a crash, the exact text that was printed out when the crash occurred. - no crash, just massive slowdown, assume 'final stall' with just more characters.
-
Further information such as stack traces may be useful, but is not necessary. - Morten provided such:
0x00007ffff6de034c in g_utf8_pointer_to_offset () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
(gdb) where
#0 0x00007ffff6de034c in g_utf8_pointer_to_offset ()
at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1 0x00007ffff6cc6f54 in pango_glyph_string_index_to_x_full
(glyphs=0x55555574b500, text=0x5555562571f0 "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij"..., length=<optimized out>, analysis=0x5555561af150, attrs=0x555555fcc710, index=8100, trailing=1, x_pos=0x7fffffffcd6c)
at ../pango/glyphstring.c:538
#2 0x00007ffff6cd6846 in pango_layout_line_index_to_x
(line=line@entry=0x555555e14590, index=<optimized out>, trailing=trailing@entry=1, x_pos=x_pos@entry=0x7fffffffcd6c) at ../pango/pango-layout.c:1828
#3 0x00007ffff6cd6cf8 in pango_layout_get_cursor_pos
(layout=layout@entry=0x555556031990, index=8101, strong_pos=strong_pos@entry=0x7fffffffce10, weak_pos=weak_pos@entry=0x0) at ../pango/pango-layout.c:2618
#4 0x00007ffff6cd704e in pango_layout_line_get_cursors
(line=line@entry=0x555555e14590, strong=strong@entry=1, cursors=cursors@entry=0x5555561dd440) at ../pango/pango-layout.c:2052
#5 0x00007ffff6cd7299 in pango_layout_move_cursor_visually
(layout=0x555556031990, strong=1, old_index=1761, old_trailing=<optimized out>, direction=-1, new_index=0x7fffffffcf4c, new_trailing=0x7fffffffcf50)
at ../pango/pango-layout.c:2147
#6 0x00007ffff71c15f3 in gtk_entry_move_visually
--Type <RET> for more, q to quit, c to continue without paging--
(count=-1, start=<optimized out>, entry=0x5555559ee970)
at ../../../../gtk/gtkentry.c:7138
helps???