Ok i _think_ i might be onto something. Today i got myself familar with using oprofile, and i gave it a shot (trying to debug starcraft II demo stalls under wine, actually ^^)...
The attached file is from an oprofile run i started when a complex document was fully loaded already. Nothing complex in the current viewport - only some text. Panning works satisfactory. However, zooming in and out takes FAR longer than it should - half a minute for a single canvas update...
This oprofile report is just from zooming in and out at a rather uncomplex position in a moderately complex text collage document. Seems to narrow down to the bounds_exact_transformed() function!?
And seems to be from this backtrace...
Can someone verify this?
Breakpoint 1, bounds_exact_transformed (pv=std::vector of length 2, capacity 2 = {...}, t=...) at helper/geom.cpp:159
#0 bounds_exact_transformed (pv=std::vector of length 2, capacity 2 = {...}, t=...) at helper/geom.cpp:159
#1 0x000000000058e9c5 in nr_arena_glyphs_update (item=0x50a1dc0, gc=0x7fffe8bbf130) at display/nr-arena-glyphs.cpp:120
#2 0x0000000000593071 in nr_arena_item_invoke_update (item=0x50a1dc0, area=0x0, gc=<optimized out>, state=510, reset=510) at display/nr-arena-item.cpp:266
#3 0x000000000058ffb3 in nr_arena_group_update (item=0x509eb40, area=0x0, gc=0x7fffe8bbf2d0, state=510, reset=510) at display/nr-arena-group.cpp:176
#4 0x0000000000593071 in nr_arena_item_invoke_update (item=0x509eb40, area=0x0, gc=<optimized out>, state=510, reset=510) at display/nr-arena-item.cpp:266
#5 0x000000000058ffb3 in nr_arena_group_update (item=0x509fb00, area=0x0, gc=0x7fffe8bbf470, state=510, reset=510) at display/nr-arena-group.cpp:176
#6 0x0000000000593071 in nr_arena_item_invoke_update (item=0x509fb00, area=0x0, gc=<optimized out>, state=510, reset=510) at display/nr-arena-item.cpp:266
#7 0x000000000058ffb3 in nr_arena_group_update (item=0x5070dc0, area=0x0, gc=0x7fffe8bbf610, state=510, reset=510) at display/nr-arena-group.cpp:176
#8 0x0000000000593071 in nr_arena_item_invoke_update (item=0x5070dc0, area=0x0, gc=<optimized out>, state=510, reset=510) at display/nr-arena-item.cpp:266
#9 0x000000000058ffb3 in nr_arena_group_update (item=0x1bde9a0, area=0x0, gc=0x7fffe8bbf7b0, state=510, reset=510) at display/nr-arena-group.cpp:176
#10 0x0000000000593071 in nr_arena_item_invoke_update (item=0x1bde9a0, area=0x0, gc=<optimized out>, state=510, reset=510) at display/nr-arena-item.cpp:266
#11 0x000000000058ffb3 in nr_arena_group_update (item=0x1bdedc0, area=0x0, gc=0x7fffe8bbf950, state=510, reset=510) at display/nr-arena-group.cpp:176
#12 0x0000000000593071 in nr_arena_item_invoke_update (item=0x1bdedc0, area=0x0, gc=<optimized out>, state=510, reset=510) at display/nr-arena-item.cpp:266
#13 0x00000000009709c5 in sp_canvas_arena_update (item=0x32ed080, affine=..., flags=<optimized out>) at display/canvas-arena.cpp:164
#14 0x00000000005ab276 in sp_canvas_item_invoke_update (item=0x32ed080, affine=<optimized out>, flags=2) at display/sp-canvas.cpp:292
#15 0x00000000005ad2af in sp_canvas_group_update (item=0x32b71b0, affine=..., flags=2) at display/sp-canvas.cpp:785
#16 0x00000000005ab276 in sp_canvas_item_invoke_update (item=0x32b71b0, affine=<optimized out>, flags=1) at display/sp-canvas.cpp:292
#17 0x00000000005ad2af in sp_canvas_group_update (item=0x2eb8560, affine=..., flags=1) at display/sp-canvas.cpp:785
#18 0x00000000005ab276 in sp_canvas_item_invoke_update (item=0x2eb8560, affine=<optimized out>, flags=0) at display/sp-canvas.cpp:292
#19 0x00000000005aebe1 in do_update (canvas=0x3268000) at display/sp-canvas.cpp:2084
#20 0x00000000005af1b2 in idle_handler (data=<optimized out>) at display/sp-canvas.cpp:2112
#21 0x00007f818286bf9a in g_main_dispatch (context=0x122b330) at gmain.c:2441
#22 g_main_context_dispatch (context=0x122b330) at gmain.c:3014
#23 0x00007f818286c778 in g_main_context_iterate (context=0x122b330, block=1, dispatch=1, self=<optimized out>) at gmain.c:3092
#24 0x00007f818286cd72 in g_main_loop_run (loop=0x33386c0) at gmain.c:3300
#25 0x00007f81870e7d6f in IA__gtk_main () at gtkmain.c:1256
#26 0x00000000004543f9 in sp_main_gui (argc=1, argv=0x7fffe8bc0408) at main.cpp:978
#27 0x00007f8181d0ce2c in __libc_start_main (main=0x455840 <main(int, char**)>, argc=1, ubp_av=0x7fffe8bc0408, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimize
d out>, stack_end=0x7fffe8bc03f8) at libc-start.c:226
#28 0x00000000004526e9 in _start ()
Ok i _think_ i might be onto something. Today i got myself familar with using oprofile, and i gave it a shot (trying to debug starcraft II demo stalls under wine, actually ^^)... exact_transform ed() function!?
The attached file is from an oprofile run i started when a complex document was fully loaded already. Nothing complex in the current viewport - only some text. Panning works satisfactory. However, zooming in and out takes FAR longer than it should - half a minute for a single canvas update...
This oprofile report is just from zooming in and out at a rather uncomplex position in a moderately complex text collage document. Seems to narrow down to the bounds_
And seems to be from this backtrace...
Can someone verify this?
Breakpoint 1, bounds_ exact_transform ed (pv=std::vector of length 2, capacity 2 = {...}, t=...) at helper/geom.cpp:159 exact_transform ed (pv=std::vector of length 2, capacity 2 = {...}, t=...) at helper/geom.cpp:159 glyphs_ update (item=0x50a1dc0, gc=0x7fffe8bbf130) at display/ nr-arena- glyphs. cpp:120 item_invoke_ update (item=0x50a1dc0, area=0x0, gc=<optimized out>, state=510, reset=510) at display/ nr-arena- item.cpp: 266 group_update (item=0x509eb40, area=0x0, gc=0x7fffe8bbf2d0, state=510, reset=510) at display/ nr-arena- group.cpp: 176 item_invoke_ update (item=0x509eb40, area=0x0, gc=<optimized out>, state=510, reset=510) at display/ nr-arena- item.cpp: 266 group_update (item=0x509fb00, area=0x0, gc=0x7fffe8bbf470, state=510, reset=510) at display/ nr-arena- group.cpp: 176 item_invoke_ update (item=0x509fb00, area=0x0, gc=<optimized out>, state=510, reset=510) at display/ nr-arena- item.cpp: 266 group_update (item=0x5070dc0, area=0x0, gc=0x7fffe8bbf610, state=510, reset=510) at display/ nr-arena- group.cpp: 176 item_invoke_ update (item=0x5070dc0, area=0x0, gc=<optimized out>, state=510, reset=510) at display/ nr-arena- item.cpp: 266 group_update (item=0x1bde9a0, area=0x0, gc=0x7fffe8bbf7b0, state=510, reset=510) at display/ nr-arena- group.cpp: 176 item_invoke_ update (item=0x1bde9a0, area=0x0, gc=<optimized out>, state=510, reset=510) at display/ nr-arena- item.cpp: 266 group_update (item=0x1bdedc0, area=0x0, gc=0x7fffe8bbf950, state=510, reset=510) at display/ nr-arena- group.cpp: 176 item_invoke_ update (item=0x1bdedc0, area=0x0, gc=<optimized out>, state=510, reset=510) at display/ nr-arena- item.cpp: 266 arena_update (item=0x32ed080, affine=..., flags=<optimized out>) at display/ canvas- arena.cpp: 164 item_invoke_ update (item=0x32ed080, affine=<optimized out>, flags=2) at display/ sp-canvas. cpp:292 group_update (item=0x32b71b0, affine=..., flags=2) at display/ sp-canvas. cpp:785 item_invoke_ update (item=0x32b71b0, affine=<optimized out>, flags=1) at display/ sp-canvas. cpp:292 group_update (item=0x2eb8560, affine=..., flags=1) at display/ sp-canvas. cpp:785 item_invoke_ update (item=0x2eb8560, affine=<optimized out>, flags=0) at display/ sp-canvas. cpp:292 sp-canvas. cpp:2084 sp-canvas. cpp:2112 context_ dispatch (context=0x122b330) at gmain.c:3014 context_ iterate (context=0x122b330, block=1, dispatch=1, self=<optimized out>) at gmain.c:3092 0408) at main.cpp:978 0x7fffe8bc0408, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimize 0x7fffe8bc03f8) at libc-start.c:226
#0 bounds_
#1 0x000000000058e9c5 in nr_arena_
#2 0x0000000000593071 in nr_arena_
#3 0x000000000058ffb3 in nr_arena_
#4 0x0000000000593071 in nr_arena_
#5 0x000000000058ffb3 in nr_arena_
#6 0x0000000000593071 in nr_arena_
#7 0x000000000058ffb3 in nr_arena_
#8 0x0000000000593071 in nr_arena_
#9 0x000000000058ffb3 in nr_arena_
#10 0x0000000000593071 in nr_arena_
#11 0x000000000058ffb3 in nr_arena_
#12 0x0000000000593071 in nr_arena_
#13 0x00000000009709c5 in sp_canvas_
#14 0x00000000005ab276 in sp_canvas_
#15 0x00000000005ad2af in sp_canvas_
#16 0x00000000005ab276 in sp_canvas_
#17 0x00000000005ad2af in sp_canvas_
#18 0x00000000005ab276 in sp_canvas_
#19 0x00000000005aebe1 in do_update (canvas=0x3268000) at display/
#20 0x00000000005af1b2 in idle_handler (data=<optimized out>) at display/
#21 0x00007f818286bf9a in g_main_dispatch (context=0x122b330) at gmain.c:2441
#22 g_main_
#23 0x00007f818286c778 in g_main_
#24 0x00007f818286cd72 in g_main_loop_run (loop=0x33386c0) at gmain.c:3300
#25 0x00007f81870e7d6f in IA__gtk_main () at gtkmain.c:1256
#26 0x00000000004543f9 in sp_main_gui (argc=1, argv=0x7fffe8bc
#27 0x00007f8181d0ce2c in __libc_start_main (main=0x455840 <main(int, char**)>, argc=1, ubp_av=
d out>, stack_end=
#28 0x00000000004526e9 in _start ()