flagsmith-java-client
flagsmith-java-client copied to clipboard
Fast optimized API for fetching a single flag
This change basically allows API calls that make minimum required calls to calculate the value of a flag.
Results of benchmark
Benchmark (dataSet) Mode Cnt Score Error Units
EvaluationBenchmark.singleFlagLegacy engineTestData thrpt 5 96478.239 ± 3882.713 ops/s
EvaluationBenchmark.singleFlagLegacy engineTestDataBig thrpt 5 6728.295 ± 206.439 ops/s
EvaluationBenchmark.singleFlagOptimal engineTestData thrpt 5 444513.222 ± 15888.499 ops/s
EvaluationBenchmark.singleFlagOptimal engineTestDataBig thrpt 5 5004271.701 ± 1647748.621 ops/s
The result is pretty evident on big test data (450 segments, 1000 flags, 1500 rules).
To change,
- Remove the new optimized environment model and push logic to existing
EnvironmentModel. - Separate tests for Engine.
- Tests for the new Flagsmith Client methods.
The concerns should be addressed now (hopefully) 🙏. Let me know if further work is need to be done.