Package: openscad
Version: 2019.05-3
Severity: normal

An idle copy of openscad uses about 7% of the CPU on my very fast
laptop.  stracing it shows it polling, with a short timeout.  Some of
this work is to spot changes to input files, but it calls call poll()
many times for each time it actually does anything.

Searching upstream found this:
  https://github.com/openscad/openscad/issues/2921
That issue suggests that this is something to do with joystick
support.

I happen to have a copy of the version from stretch, 2015.03-2+dfsg-2,
and that is a lot better.  I think this is perhaps simply because it
doesn't make the unnecessary poll() calls.

(Obviously it would better still if openscad could use inotify as
discussed in that report.)

bullseye:

strace: Process 13407 attached
14:04:48.496409 restart_syscall(<... resuming interrupted poll ...>) = 0
14:04:48.499221 poll([{fd=3, events=POLLIN}], 1, 28) = 0 (Timeout)
14:04:48.530595 poll([{fd=3, events=POLLIN}], 1, 29) = 0 (Timeout)
14:04:48.563572 poll([{fd=3, events=POLLIN}], 1, 10) = 0 (Timeout)
14:04:48.574202 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, 
...}) = 0
14:04:48.574658 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, 
...}) = 0
14:04:48.574976 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, 
...}) = 0
14:04:48.575681 stat("/home/ian/things/Reprap/play/deore-crank-remover.scad", 
{st_mode=S_IFREG|0664, st_size=625, ...}) = 0
14:04:48.576413 poll([{fd=3, events=POLLIN}], 1, 13) = 0 (Timeout)
14:04:48.594723 poll([{fd=3, events=POLLIN}], 1, 25) = 0 (Timeout)
14:04:48.623665 poll([{fd=3, events=POLLIN}], 1, 28) = 0 (Timeout)
14:04:48.655509 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:48.685615 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:48.715542 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:48.745814 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:48.776038 poll([{fd=3, events=POLLIN}], 1, 0) = 0 (Timeout)
14:04:48.776567 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, 
...}) = 0
14:04:48.776900 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, 
...}) = 0
14:04:48.777091 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, 
...}) = 0
14:04:48.777298 stat("/home/ian/things/Reprap/play/deore-crank-remover.scad", 
{st_mode=S_IFREG|0664, st_size=625, ...}) = 0
14:04:48.777737 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:48.807525 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:48.837275 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:48.867660 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:48.897661 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:48.927569 poll([{fd=3, events=POLLIN}], 1, 28) = 0 (Timeout)
14:04:48.959515 poll([{fd=3, events=POLLIN}], 1, 14) = 0 (Timeout)
14:04:48.974215 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, 
...}) = 0
14:04:48.975464 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, 
...}) = 0
14:04:48.976075 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, 
...}) = 0
14:04:48.976743 stat("/home/ian/things/Reprap/play/deore-crank-remover.scad", 
{st_mode=S_IFREG|0664, st_size=625, ...}) = 0
14:04:48.977912 poll([{fd=3, events=POLLIN}], 1, 8) = 0 (Timeout)
14:04:48.989112 poll([{fd=3, events=POLLIN}], 1, 26) = 1 ([{fd=3, 
revents=POLLIN}])
14:04:49.002715 read(3, "\1\0\0\0\0\0\0\0", 16) = 8
14:04:49.003068 poll([{fd=3, events=POLLIN}], 1, 12) = 0 (Timeout)
14:04:49.018968 poll([{fd=3, events=POLLIN}], 1, 27) = 0 (Timeout)
14:04:49.049851 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:49.079775 poll([{fd=3, events=POLLIN}], 1, 28) = 0 (Timeout)
14:04:49.111751 poll([{fd=3, events=POLLIN}], 1, 26) = 0 (Timeout)
14:04:49.141673 poll([{fd=3, events=POLLIN}], 1, 26^Cstrace: Process 13407 
detached
 <detached ...>

stretch:

strace: Process 13419 attached
14:06:54.301805 restart_syscall(<... resuming interrupted poll ...>) = 0
14:06:54.374222 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.375364 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.376003 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.376683 stat("/home/ian/things/Reprap/play/deore-crank-remover.scad", 
{st_mode=S_IFREG|0664, st_size=625, ...}) = 0
14:06:54.377576 poll([{fd=9, events=POLLIN}], 1, 196) = 1 ([{fd=9, 
revents=POLLIN}])
14:06:54.493077 read(9, "\1\0\0\0\0\0\0\0", 16) = 8
14:06:54.493403 poll([{fd=9, events=POLLIN}], 1, 80) = 1 ([{fd=9, 
revents=POLLIN}])
14:06:54.498455 read(9, "\1\0\0\0\0\0\0\0", 16) = 8
14:06:54.498707 poll([{fd=9, events=POLLIN}], 1, 75) = 0 (Timeout)
14:06:54.574211 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.574552 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.574827 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.575168 stat("/home/ian/things/Reprap/play/deore-crank-remover.scad", 
{st_mode=S_IFREG|0664, st_size=625, ...}) = 0
14:06:54.575606 poll([{fd=9, events=POLLIN}], 1, 198) = 1 ([{fd=9, 
revents=POLLIN}])
14:06:54.736680 read(9, "\1\0\0\0\0\0\0\0", 16) = 8
14:06:54.737115 poll([{fd=9, events=POLLIN}], 1, 36) = 0 (Timeout)
14:06:54.773824 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.775062 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.775373 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.775962 stat("/home/ian/things/Reprap/play/deore-crank-remover.scad", 
{st_mode=S_IFREG|0664, st_size=625, ...}) = 0
14:06:54.776956 poll([{fd=9, events=POLLIN}], 1, 197) = 0 (Timeout)
14:06:54.974902 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.975336 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.975683 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:54.976000 stat("/home/ian/things/Reprap/play/deore-crank-remover.scad", 
{st_mode=S_IFREG|0664, st_size=625, ...}) = 0
14:06:54.976465 poll([{fd=9, events=POLLIN}], 1, 197) = 0 (Timeout)
14:06:55.174216 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:55.175435 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:55.175833 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:55.176357 stat("/home/ian/things/Reprap/play/deore-crank-remover.scad", 
{st_mode=S_IFREG|0664, st_size=625, ...}) = 0
14:06:55.177208 poll([{fd=9, events=POLLIN}], 1, 196) = 0 (Timeout)
14:06:55.374022 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:55.375187 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:55.375494 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3687, 
...}) = 0
14:06:55.375983 stat("/home/ian/things/Reprap/play/deore-crank-remover.scad", 
{st_mode=S_IFREG|0664, st_size=625, ...}) = 0
14:06:55.376737 poll([{fd=9, events=POLLIN}], 1, 197^Cstrace: Process 13419 
detached
 <detached ...>


-- Package-specific info:
Output of /usr/share/bug/openscad:
$ glxinfo |grep 'OpenGL .* string:'
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Iris Graphics 540 (Skylake GT3e) 
OpenGL core profile version string: 4.6 (Core Profile) Mesa 19.3.3
OpenGL core profile shading language version string: 4.60
OpenGL version string: 3.0 Mesa 19.3.3
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.3.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-0.bpo.2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages openscad depends on:
ii  lib3mf1                                            1.8.1+ds-3
ii  libboost-filesystem1.67.0                          1.67.0-17
ii  libboost-program-options1.67.0                     1.67.0-17
ii  libboost-regex1.67.0 [libboost-regex1.67.0-icu63]  1.67.0-17
ii  libboost-system1.67.0                              1.67.0-17
ii  libc6                                              2.29-10
ii  libdouble-conversion3                              3.1.5-5
ii  libfontconfig1                                     2.13.1-2+b1
ii  libfreetype6                                       2.10.1-2
ii  libgcc1                                            1:9.2.1-25
ii  libgl1                                             1.3.0-7
ii  libglew2.1                                         2.1.0-4+b1
ii  libglib2.0-0                                       2.62.4-1+b1
ii  libglu1-mesa [libglu1]                             9.0.1-1
ii  libgmp10                                           2:6.1.2+dfsg-4
ii  libharfbuzz0b                                      2.6.4-1
ii  libmpfr6                                           4.0.2-1
ii  libopencsg1                                        1.4.2-3
ii  libqscintilla2-qt5-15                              2.11.2+dfsg-5
ii  libqt5core5a                                       5.12.5+dfsg-8
ii  libqt5dbus5                                        5.12.5+dfsg-8
ii  libqt5gamepad5                                     5.12.5-1
ii  libqt5gui5                                         5.12.5+dfsg-8
ii  libqt5multimedia5                                  5.12.5-1+b1
ii  libqt5network5                                     5.12.5+dfsg-8
ii  libqt5widgets5                                     5.12.5+dfsg-8
ii  libspnav0                                          0.2.3-1+b2
ii  libstdc++6                                         9.2.1-25
ii  libx11-6                                           2:1.6.8-1
ii  libxml2                                            2.9.4+dfsg1-8
ii  libzip4                                            1.5.2-1

Versions of packages openscad recommends:
ii  openscad-mcad  2019.05-1

Versions of packages openscad suggests:
pn  geomview          <none>
pn  librecad          <none>
pn  meshlab           <none>
pn  openscad-testing  <none>

-- no debconf information

Reply via email to