Closed Kerumen closed 6 years ago
Yeah. Nice idea. Maybe an opt-in for „lazy“ loading flags when defaultFlags are passed. Maybe also another adapter configuration so that they fetch flags more lazily. How would that work for splitio from their SDK side of things?
I think (but it should be confirmed) that the names()
call doesn't account for traffic but only when you do the getTreatment()
call. So instead of calling getTreatment
for all the flags, we can try to call it only when it's required.
...but "required" would mean calling it lazily on each flag "request"? I'd have to think of a way do go about that as the current setup manages all flags but could be able to populate the store once each flag has been requested by a feature toggling component.
I will close this due to inactivity. I tried to come up with a way in the current architecture of flopflip to enable this but am failing at that. I will keep this in mind whenever other users have similar requests. Thanks a lot for the suggestion!
On the 2 feature-flags services offered by the library (launchdarkly and split.io) they have the notion of an "used" flag. A flag which received traffic during the last few days. It's great because it helps remove dead code and flag which are not used anymore. On flopflip, we require all the flags (because the library is designed like this) so we can't have the "real" traffic data. Even if a flag is unused we won't know it.
I think we should try to find a way to improve this.