-
Notifications
You must be signed in to change notification settings - Fork 661
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
(Meta issue) Simplify the framework #1201
Comments
Looking through the framework makes me wonder why we did certain things the way we do. We have different design patterns, heavily templated code, lots of abstractions which in the end do nothing more than to fill out a Vk*CreateInfo structure. I wonder how we can simplify that in such a way that esp. the higher level framework becomes easy to follow and debug again? I don't consider myself a C++ power user, but imo the code should be readable by someone with average C++ skills (like me). Yet we have whole header/implementation files that I don't understand at all (and sadly those files have little or often no code comments at all). |
A side effect of the current project structure is a relatively long compile time. A clean build on macOS takes about 5 minutes on my 8700K machine (6x2 cores using parallel compilation). This also results in longer CI times which has been a topic here before. Can things be restructured to use precompiled headers or other componentization methods to reduce both clean and incremental build times? Even if the frameworks continue to take time, speeding up sample compilation could really help. In the current setup using my machine, each sample takes about 16-18 sec which quickly adds up even with parallel compilation enabled (12 threads). Single-threaded serialized compilation illustrates the issue more starkly, taking about 30 minutes on my machine with 9-10 seconds per sample. |
Indeed, it's something we need to address. We did some improvements, but still compilation times are too long compared to other similar projects. We'll probably move to C++20 (for other reasons) and then start using modules which should reduce build times, esp. for anything using Vulkan.hpp. Windows is a bit better, but building this repo still takes almost 5 minutes in my setup, compared to building my own samples, which only takes ~40s. |
We also do a lot of abstractions that are IMO totally unnecessary. Even for simple, non-Vulkan related things. This is causing us issues that are night impossible to debug. |
A common criticism with our samples is the complicated framework. Esp. the samples that use the high level framework have a lot of abstraction, making it hard to debug, follow or learn from the code. While there is no direct action to take here we should look at ways to simplify the framework like removing multiple levels of abstraction and agreeing on ways to write code. Using modern C++ features might look nice, but if they result in code that's hard to follow we should not use in the samples.
The text was updated successfully, but these errors were encountered: