pisa icon indicating copy to clipboard operation
pisa copied to clipboard

Optional dependencies

Open elshize opened this issue 4 years ago • 0 comments

Overview

Optional compilation of dependencies allows for faster compilation (in cases the dependencies are not necessary) and possibly working around dependent libraries not compiling on a target.

Details

Some libraries we depend on don't have to impact working of the entire system. The chief example here is all the encoding methods we have for index compression. Say, you're working on a specific task and choose your encoding to be SIMD-BP128 for example (which happened to me recently several times). At this point, any (re)compilation for experiments spends unnecessarily a lot of time on compiling code that will never be used and could be skipped.

I recently just commented out all index types in index_types.hpp but the one I used. But that's a crude workaround. Moreover, it still downloads and compiles all the dependencies.

It would be good to have a feature flags in the build system. For example, if you say -DPISA_ENCODING=simdbp:pef, we only compile stuff needed for that.

At first, we can even simplify it to work only if tests are not compiled, because I believe parameterizing those would be a significant chunk of work. So maybe that should be done separately at a later time.

elshize avatar Sep 18 '20 20:09 elshize