[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: FC2: gnome-terminal takes much longer to startup than Mozilla



Jason Tackaberry wrote:
On Tue, 2004-05-25 at 16:31 -0400, Will Cohen wrote:

Funny, I learned about passing xterm a command to execute from your email. :)


Well that's good to hear. :) The -e switch works with gnome-terminal
too, incidentally.



Remember the our goal is to improve the performance of the Linux Desktop, not to be correct every single time.


True, being correct every single time doesn't hurt either. :)

It doesn't hurt to be correct. However, I knew some people that got into a wierd mindset with a perfect 4.0 (out of 4.0) grade point average. The 4.0 grade point became the object rather than learning, they had to avoid making mistakes and hurting the 4.0.


PS I learned today that gnome actually uses gnome-terminal rather than xterm.


It does, and it definitely could stand some performance improvements.  I
don't think it's _vastly_ slower than xterm (once it's started), but it
does often get in the way.

I think it was Warren who mentioned that he has to minimize
gnome-terminal when he's doing a noisy compile otherwise it
significantly slows down.  That's certainly true for me too (although I
just toggle to another tab), but I'm not sure if the real problem is
with gnome-terminal, pango, or the underlying font system -- or perhaps
at layers even lower than that, like really bad or non-existent Render
support in the video driver.

Cheers,
Jason.

This morning I played around with some profiling of gnome-terminal. I got a freely available text file from project Gutenberg.net,
http://www.gutenberg.net/etext02/jarg422.txt.


I wrote a cruddy little script call cattest to start up oprofile and cat the file, then shutdown oprofile. I ran this on the console of a 2.4GHz p4 machine with 512 MB of memory. The script is attached to this email. It requires an SMP kernel and needs to be run as root.

After running the little script and installing the debuginfo rpms I was able to get some profiles. It looks like this particular machine has a reasonable video card (NVIDIA Quadro 4). Most of the are not for drawing stuff on the screen.

One drawback is rpm with /usr/X11R6/bin/Xorg does not have an associated debuginfo rpm. I assume this is where the redendering happens and where people see the performance hit in gnome-terminal.

The first opreport shows the overall view of which applications had samples and the shared libraries associated with them. The second opreport lists the function-by-function breakdown. Why so much 25% of the time in memchr and real_tolower?

-Will



$ opreport --long-filenames|more CPU: P4 / Xeon, speed 2387.54 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped)
with a unit mask of 0x01 (mandatory) count 100000
GLOBAL_POWER_E...|
samples| %|
------------------
109105 77.3520 /usr/bin/gnome-terminal
GLOBAL_POWER_E...|
samples| %|
------------------
34940 32.0242 /lib/tls/libc-2.3.3.so
34762 31.8611 /usr/lib/libvte.so.4.1.1
23412 21.4582 /usr/lib/libglib-2.0.so.0.400.0
4527 4.1492 /usr/X11R6/lib/libXft.so.2.1.2
3126 2.8651 /lib/tls/libpthread-0.61.so
2843 2.6057 /usr/lib/libgobject-2.0.so.0.400.0
2419 2.2171 /usr/lib/libgdk-x11-2.0.so.0.400.0
1090 0.9990 /usr/lib/libgtk-x11-2.0.so.0.400.0
696 0.6379 /usr/X11R6/lib/libX11.so.6.2
549 0.5032 /usr/lib/libfreetype.so.6.3.5
298 0.2731 /usr/lib/gtk-2.0/2.4.0/engines/libbluecurve.so
258 0.2365 /usr/lib/libgthread-2.0.so.0.400.0
143 0.1311 /usr/X11R6/lib/libXrender.so.1.2.2
29 0.0266 /usr/bin/gnome-terminal
7 0.0064 /usr/lib/libfontconfig.so.1.0.4
6 0.0055 /usr/lib/libORBit-2.so.0.0.0
15215 10.7870 /usr/X11R6/bin/Xorg
GLOBAL_POWER_E...|
samples| %|
------------------
12259 80.5718 /usr/X11R6/bin/Xorg
2956 19.4282 /lib/tls/libc-2.3.3.so
14393 10.2042 /no-vmlinux


$ opreport image:/usr/bin/gnome-terminal -l --long-filenames|more
CPU: P4 / Xeon, speed 2387.54 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped)
with a unit mask of 0x01 (mandatory) count 100000
samples % image name symbol name
16863 15.4558 /lib/tls/libc-2.3.3.so __GI_memchr
12146 11.1324 /usr/lib/libglib-2.0.so.0.400.0 real_tolower
7696 7.0538 /lib/tls/libc-2.3.3.so __GI_memcpy
5693 5.2179 /usr/lib/libvte.so.4.1.1 _vte_iso2022_process
5571 5.1061 /usr/lib/libvte.so.4.1.1 vte_terminal_send
4893 4.4847 /lib/tls/libc-2.3.3.so __GI_memset
3166 2.9018 /usr/lib/libvte.so.4.1.1 vte_sequence_handler_set_title_internal
2547 2.3344 /usr/lib/libglib-2.0.so.0.400.0 g_async_queue_length
2449 2.2446 /usr/lib/libglib-2.0.so.0.400.0 g_async_queue_push_unlocked
2394 2.1942 /usr/lib/libvte.so.4.1.1 vte_terminal_feed_child
2263 2.0741 /usr/lib/libvte.so.4.1.1 _vte_ring_insert_preserve
2152 1.9724 /usr/X11R6/lib/libXft.so.2.1.2 XftGlyphFontSpecRender
2127 1.9495 /usr/lib/libvte.so.4.1.1 __do_global_ctors_aux
1812 1.6608 /usr/lib/libvte.so.4.1.1 vte_invalidate_all
1718 1.5746 /lib/tls/libc-2.3.3.so _int_malloc
1522 1.3950 /usr/lib/libglib-2.0.so.0.400.0 g_unichar_xdigit_value
1470 1.3473 /usr/lib/libvte.so.4.1.1 vte_terminal_key_press
1305 1.1961 /lib/tls/libpthread-0.61.so __pthread_mutex_unlock_usercnt
1263 1.1576 /lib/tls/libpthread-0.61.so __pthread_mutex_lock_internal


#! /bin/bash
#
# Simple test to gather data on where gnome-terminal spends time
# This is compilicated by the terminal server model of gnome-terminal.
# Using oprofile to get an overall view of what is happening on the system
# This is only going to work with kernel that have oprofile support
# (Red Hat SMP kernels)

OPCONTROL=/usr/bin/opcontrol
RESULTS_FILE=cattime

$OPCONTROL --deinit
$OPCONTROL --reset
$OPCONTROL --setup --no-vmlinux --separate=library
$OPCONTROL --start
/usr/bin/time -o $RESULTS_FILE /bin/cat /home/wcohen/jarg422.txt
$OPCONTROL --dump
$OPCONTROL --shutdown

#Need to do analysis after running the test.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]