-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Extract SafeBinaryMutex
to separate header
#87893
Extract SafeBinaryMutex
to separate header
#87893
Conversation
Can you show some data to show this reduces compile times? |
I've benchmarked the compilation of the entire engine using https://gist.github.com/vittorioromeo/fa153c494ce05da08c988a27130a79e3 There are a few heavy-hitters here and there, and not everything is easy to optimize, so I am starting with some low-hanging fruits. The "expensive headers" section of the report shows that Reducing the amount of code that |
Can you show after this change as well? Showing the problem without indicating this is a solution would be missing the important part IMO, i.e. the showing it improves compile time |
https://gist.github.com/vittorioromeo/f59a1f1e312beb603977256059681717
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, you just need to run clang-format or sort the includes manually by lexicographical order.
3eb376a
to
a23a1b3
Compare
This change simply extracts 'SafeBinaryMutex' from 'mutex.h' to 'safe_binary_mutex.h', in an effort to reduce the compilation speed impact of including `mutex.h`.
a23a1b3
to
71e0082
Compare
@Geometror: should be good to go now! :) |
SafeBinaryMutex
to separate header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me.
Thanks! |
This change simply extracts 'SafeBinaryMutex' from 'mutex.h' to 'safe_binary_mutex.h', in an effort to reduce the compilation speed impact of including
mutex.h
.Similarly in nature to #87871, this is a pure refactoring PR that shouldn't affect the behavior or Godot in any way or form.