[FEA] Move template class implementation to source file where possible
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
Currently, there are a lot of template classes in cudf. They are mostly put in the header files (`.cuh`), and those headers are included in many other source files. As a result, compiling those source files will be very slow due to the implicit instantiation of template classes. In addition, whenever the template classes were changed, all the source files containing the headers containing those template classes will be recompiled, in a significant amount of time.
**Solution:** Move the implementation of the template classes to separate source files whenever possible, and explicitly instantiate those template classes in their source files. By doing so:
* The headers now only contain (template) class declaration, which can reduce much of compile time, and
* The source files including those headers will not be recompiled when the template classes changed their implementation.
Classes with template argument that is a cudf type can be refactored to apply this principle very easily. For classes that have template argument is an iterator, we can also separate their implementation and explicitly instantiate them with some common iterator types. For classes that have template argument is a functor, we can't do anything, unfortunately 😞
Contributor guide
Assessment
This issue has not been assessed yet.