Sample Header Ad - 728x90

strace reports a system call which is taking too long

1 vote
1 answer
2278 views
# The problem The following code snippet shows the time it took to my system to open inkscape plus the time it took to me to immediately close the inkscape window.
$ /usr/bin/time -p inkscape
real 26.95
user 0.59
sys 0.05
I've read posts ([here](https://askubuntu.com/questions/574849/inkscape-starts-extremely-slow) and [here](https://askubuntu.com/questions/574849/inkscape-starts-extremely-slow)) in which people reports that inkscape takes too much to start but the answers relates this problem with the number of fonts installed in the user's system. As far as I know, I can get the number of fonts installed in my system with the following command (see below). So, the number of fonts installed in my system is not the problem here.
$ fc-list | wc -l
105
I tried looking at the strace command output and found the tasks which are slowing down the process of opening inkscape. (I'm not sharing the complete log of strace because it is reporting the name of some personal files among all the output.)
$ strace --absolute-timestamps=ns inkscape
...
13:27:03.700577007 read(11, "\1\0\0\0\0\0\0\0", 16) = 8
13:27:03.700603187 poll([{fd=11, events=POLLIN}], 1, 25000) = 0 (Timeout)
13:27:28.725932887 write(11, "\1\0\0\0\0\0\0\0", 8) = 8
13:27:28.726024537 futex(0x55ca60dcb240, FUTEX_WAKE_PRIVATE, 2147483647) = 0
...
As you can see above, there are 25 seconds between two tasks, so this definitely has to do with the problem. # The question What is the poll system call doing and how can I reduce the time it takes to my system to execute that system call? **PD1**: I tried searching poll([{fd=11, events=POLLIN}], 1, 25000 on Google and found [this question](https://bbs.archlinux.org/viewtopic.php?id=239331) in which the poster explains that GTK3 applications are starting slowly and relates this misbehavior with the fact that strace shows a system call that is taking too much time (which is the same as the one presented in this post) but I didn't found the answers helpful.
Asked by gfe (191 rep)
May 20, 2020, 06:41 PM
Last activity: May 20, 2020, 06:54 PM