Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Improve Build Time Through ArrayData forward Declarations #45332

Open
WillAyd opened this issue Jan 22, 2025 · 0 comments
Open

[C++] Improve Build Time Through ArrayData forward Declarations #45332

WillAyd opened this issue Jan 22, 2025 · 0 comments

Comments

@WillAyd
Copy link
Contributor

WillAyd commented Jan 22, 2025

Describe the enhancement requested

When reviewing the output of ClangBuildAnalyzer, it appears that the arrow/array/data.h header is considered to be the most expensive include:

**** Expensive headers:
205021 ms: /home/willayd/clones/arrow/cpp/src/arrow/array/data.h (included 168 times, avg 1220 ms), included via:
  27x: array.h array_base.h 
  11x: array_base.h 
  6x: api_scalar.h datum.h 
  6x: function.h kernel.h exec.h 
  5x: <direct include>
  5x: builder_primitive.h builder_base.h array_base.h 
  ...

158726 ms: /home/willayd/clones/arrow/cpp/src/arrow/array/array_base.h (included 168 times, avg 944 ms), included via:
  28x: array.h 
  11x: <direct include>
  6x: api_scalar.h datum.h scalar.h extension_type.h 
  6x: function.h kernel.h exec.h expression.h datum.h scalar.h extension_type.h 
  5x: builder_primitive.h builder_base.h 
  5x: gtest.h array.h 
  ...

121366 ms: /home/willayd/clones/arrow/cpp/src/arrow/type.h (included 202 times, avg 600 ms), included via:
  13x: array.h array_base.h data.h statistics.h 
  12x: array.h array_base.h data.h cassert 
  9x: array_base.h data.h statistics.h 
  6x: api_scalar.h datum.h data.h cassert statistics.h 
  5x: data.h statistics.h 
  5x: builder_primitive.h builder_base.h array_base.h data.h cassert 
  ...

According to iwyu, there are a dozen or so instances where inclusion of that header can be replaced with a forward declaration of ArrayData, which should help reduce build time

Component(s)

C++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant