include-what-you-use very slow on jammy

Asked by tom stevens

I have noticed that include-what-you-use seems to take much longer on jammy compare to focal. I have rebuilt iwyu_8.17-1 on jammy and it performs similarly to iwyu 8.17-1 on jammy downloaded from the ubuntu servers. If I rebuild iwyu 8.17-1 on jammy with one change I can cut the execution time by a factor of ~3.

Question: Is there a build problem on jammy with iwyu?

$ time ./iwyu
(test.cc has correct #includes/fwd-decls)
real 3m11.726s
user 3m10.652s
sys 0m0.203s

vs.

$ time ./iwyu
(test.cc has correct #includes/fwd-decls)
real 1m0.585s
user 1m0.335s
sys 0m0.100s

The change is to set CMAKE_BUILD_TYPE to Release.

diff -Nru iwyu-8.17/debian/changelog iwyu-8.17/debian/changelog

--- iwyu-8.17/debian/changelog 2021-12-09 05:25:46.000000000 -0700

+++ iwyu-8.17/debian/changelog 2022-08-09 18:14:51.000000000 -0600

@@ -1,3 +1,9 @@

+iwyu (8.17-1ubuntu1) UNRELEASED; urgency=medium

+

+ * try a releaes build

+

+ -- Steven Trabert <email address hidden> Tue, 09 Aug 2022 18:14:51 -0600

+

 iwyu (8.17-1) unstable; urgency=medium

   * New upstream release

diff -Nru iwyu-8.17/debian/rules iwyu-8.17/debian/rules

--- iwyu-8.17/debian/rules 2021-12-09 05:25:36.000000000 -0700

+++ iwyu-8.17/debian/rules 2022-08-09 17:59:38.000000000 -0600

@@ -22,7 +22,7 @@

 override_dh_auto_configure:

- dh_auto_configure -- -DCMAKE_CXX_FLAGS="$(ADDITIONAL_CXX_FLAGS)" -DLLVM_PATH=/usr/lib/llvm-12/ -DCMAKE_PREFIX_PATH=/usr/lib/llvm-12/

+ dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="$(ADDITIONAL_CXX_FLAGS)" -DLLVM_PATH=/usr/lib/llvm-12/ -DCMAKE_PREFIX_PATH=/usr/lib/llvm-12/

 override_dh_auto_build:

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu iwyu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
tom stevens (tsteven4) said :
#1

I filed a bug, including a patch, with debian, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016949

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.