Are the same scatterers contributing to f_calc for every calculation, or will the scatterers that are contributing vary from calculation to calculation? In the case of the former it might be simplest to create a new copy of the xray_structure with only those scatterers.
It looks the "use" flag isn't actually respected in the structure factor or gradient calculations as far as I can tell. If you feel you need something like this rather than creating new copies of the xray_structure with only the scatterers you need or alternatively setting the occupancy to zero, then this is probably something we can add into the code. There is some code in cctbx/xray/scatterer_flags.h for flags_set_grad_*() that will set a selection of gradients all at once in C++, but I don't see an equivalent for set_use_*(). I suspect that the overhead of looping through the scatterers to set flags in Python would be small compared to the cost of calculating the structure factors in the first place.
Cheers,
Richard