ash
ash copied to clipboard
Optimize manual policy check running
There are more than a few things we can do to support optimizations of manual checks:
1.) batch preparations. Perhaps we can have each manual check expose a prepare function that returns things like side_load: [:relationship], so we can fetch all necessary data in one go
2.) run checks in parallel if we know that we need to run more than one to invalidate/validate a scenario
3.) choose which check to run better. Currently, we just choose the first unknown one. we should be able to get smart about it, and choose the fact that will invalidate the most scenarios (would be the same as the fact that could validate the most scenarios)