[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
redisplay - very long lines
From: |
David Reitter |
Subject: |
redisplay - very long lines |
Date: |
Mon, 16 Feb 2009 08:44:23 -0500 |
The redisplay code seems to be unable to deal efficiently with very
long lines, that is, lines that go beyond the currently displayed
window.
This was pointed out by a blogger who wanted to abuse Emacs to make a
quick change to a binary file. I could reproduce the problem using a
17MB binary file, which loaded and displayed fine initially. I then
removed all newlines from the file, upon which redisplay gets
unbearably slow (minutes to redisplay once).
Setting truncate-lines makes things faster, but not to the point where
one could work.
This is in version 22 and 23. The profiler output (Shark) is below.
Would it be possible to add a termination condition in move_it_to to
stop after leaving the window vertically or horizontally (with
truncate-lines)? Or simply use a large enough threshold?
0.0% 99.8% Emacs start
0.0% 99.8% Emacs main
0.0% 99.8% Emacs Frecursive_edit
0.0% 99.8% Emacs recursive_edit_1
0.0% 99.8% Emacs command_loop
0.0% 99.8% Emacs internal_catch
0.0% 99.8% Emacs command_loop_2
0.0% 99.8% Emacs internal_condition_case
0.0% 99.8% Emacs command_loop_1
0.0% 99.8% Emacs call3
0.0% 99.8% Emacs Ffuncall
0.0% 99.8% Emacs Fcall_interactively
0.0% 99.8% Emacs apply1
0.0% 99.8% Emacs Fapply
0.0% 99.8% Emacs Ffuncall
0.0% 99.8% Emacs funcall_lambda
0.0% 99.8% Emacs Fbyte_code
0.0% 99.8% Emacs Ffuncall
0.0% 99.8% Emacs funcall_lambda
0.0% 99.8% Emacs Fbyte_code
0.0% 99.8% Emacs Ffuncall
0.0% 99.8% Emacs funcall_lambda
0.0% 99.8% Emacs Fbyte_code
0.0% 99.8% Emacs Ffuncall
0.0% 99.8% Emacs Freplace_match
0.0% 99.8% Emacs replace_range
0.0% 99.8% Emacs signal_after_change
0.0% 99.8% Emacs run_hook_with_args
0.0% 99.8% Emacs Ffuncall
0.0% 99.8% Emacs Fgarbage_collect
0.0% 99.8% Emacs
truncate_undo_list
0.0% 99.8% Emacs call1
0.0% 99.8% Emacs Ffuncall
0.0% 99.8% Emacs funcall_lambda
0.0% 99.8% Emacs Fbyte_code
0.0% 99.8% Emacs Ffuncall
0.0% 99.8% Emacs
funcall_lambda
0.0% 99.8% Emacs Fbyte_code
0.0% 99.8% Emacs Ffuncall
0.0% 99.8% Emacs
funcall_lambda
0.0% 99.8% Emacs
Fbyte_code
0.0% 99.8% Emacs
Ffuncall
0.0% 99.8% Emacs
Fredisplay
0.0% 99.8% Emacs
redisplay_preserve_echo_area
0.0% 99.8% Emacs
redisplay_internal
0.0% 99.8% Emacs
redisplay_windows
0.0% 99.8% Emacs
redisplay_windows
0.0% 99.8% Emacs
internal_condition_case_1
0.0% 99.8% Emacs
redisplay_window_0
0.0% 99.8% Emacs
redisplay_window
0.0% 99.8% Emacs
move_it_vertically_backward
0.0% 62.3% Emacs
move_it_to
8.9% 62.0% Emacs
move_it_in_display_line_to
14.2% 30.5%
Emacs
x_produce_glyphs
2.1% 9.3% Emacs
get_per_char_metric
7.1% 7.1%
Emacs
nsfont_text_extents
3.3% 6.5% Emacs
get_char_face_and_encoding
0.5% 0.5% Emacs
take_vertical_position_into_account
0.1% 0.1% Emacs
nsfont_text_extents
8.3% 17.5% Emacs
get_next_display_element
3.5% 4.4% Emacs
set_iterator_to_next
0.4% 0.4% Emacs
next_element_from_display_vector
0.1% 0.1% Emacs
next_element_from_buffer
0.1% 0.1% Emacs
get_char_face_and_encoding
0.0% 0.0% Emacs
char_table_ref
0.1% 0.1% Emacs
set_iterator_to_next
0.1% 0.1% Emacs
x_produce_glyphs
0.1% 0.1% Emacs
get_next_display_element
0.0% 0.0% Emacs
recenter_overlay_lists
0.0% 37.3% Emacs
move_it_by_lines
0.0% 0.1% Emacs
back_to_previous_visible_line_start
0.0% 0.0% Emacs
line_bottom_y
0.0% 0.0% Emacs
try_window
0.0% 0.0% Emacs
move_it_by_lines
0.0% 0.0% Emacs
prepare_menu_bars
0.1% 0.1% mach_kernel lo_alltraps
0.0% 0.0% mach_kernel i386_astintr
0.0% 0.0% mach_kernel lo_unix_scall
0.0% 0.0% mach_kernel IOWorkLoop::threadMain()
0.0% 0.0% mach_kernel thread_continue
0.0% 0.0% mach_kernel ml_set_interrupts_enabled
0.0% 0.0% mach_kernel lo_mach_scall
- redisplay - very long lines,
David Reitter <=
- Re: redisplay - very long lines, Eli Zaretskii, 2009/02/16
- Re: redisplay - very long lines, David Reitter, 2009/02/16
- Re: redisplay - very long lines, Eli Zaretskii, 2009/02/16
- Re: redisplay - very long lines, Stefan Monnier, 2009/02/17
- Re: redisplay - very long lines, Eli Zaretskii, 2009/02/17
- Re: redisplay - very long lines, David Reitter, 2009/02/17
- Re: redisplay - very long lines, Eli Zaretskii, 2009/02/17
- Re: redisplay - very long lines, David Reitter, 2009/02/17
- Re: redisplay - very long lines, Eli Zaretskii, 2009/02/18
- Re: redisplay - very long lines, Stefan Monnier, 2009/02/18