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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the source a regular class #1498
Conversation
ada0243
to
409299a
Compare
@elvisoric you might be interested in this. It should remove some of the friction for exploratory changes. |
@tobim Thank you. I'll take a look. |
409299a
to
6336b7f
Compare
This introduces a reader factory that is used for `vast import` and `spawn source` instead of instantiating `source`, `make_source`, `import_command`, etc with every existing reader type. This change is intended to improve the dev experience during modify -> compile -> run cycles by speeding up incremental builds. A local test simulating a change to `source.hpp` gives the following times for me: Before: ``` $ touch libvast/vast/system/source.hpp $ time cmake --build ~/t/build/vast/debug -j 1 [0/2] Re-checking globbed directories... [19/19] Linking CXX executable bin/example-test ________________________________________________________ Executed in 155.45 secs fish external usr time 154.25 secs 38.12 millis 154.21 secs sys time 8.83 secs 5.00 millis 8.83 secs ``` After: ``` $ touch libvast/vast/system/source.hpp $ time cmake --build ~/t/build/vast/detemp -j 1 [0/2] Re-checking globbed directories... [15/15] Linking integration test directory ________________________________________________________ Executed in 83.25 secs fish external usr time 85.76 secs 0.00 micros 85.76 secs sys time 5.49 secs 712.00 micros 5.49 secs ```
9f955b8
to
328257e
Compare
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.
I made the requested changes myself, they're all contained in the last commit. @tobim if you approve of my changes, please just merge the PR after CI is done.
- Pulls in changes from upstream - Removes templated source_common utility functions
328257e
to
e02de1b
Compare
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.
Thanks for finishing. Consider this approved from my side.
馃摂 Description
This introduces a reader factory that is used for
vast import
andspawn source
instead of instantiatingsource
,make_source
,import_command
, etc with every existing reader type.This change is intended to improve the dev experience during modify -> compile -> run cycles by speeding up incremental builds.
A local test simulating a change to
source.hpp
gives the following times for me:Before:
After:
馃幆 Review Instructions
Sorry for the single big commit, it is probably easiest to compare the this against the merge base by checking both locally and opening the header of master next to the
cpp
from this branch, i.e.master/source.hpp
|detemplate/source.cpp
.One can probably start by looking at the changes that were done for the
reader
and derived classes, and then go from outside in:application.cpp
->import_command
->make_source
->source
&source_common
.spawn_source
andnode.cpp
are obvious afterwards.I'm available for a review call is anyone is interested.