Quote:
Originally Posted by kovidgoyal
Since the set will typically be empty, seems like it shouldn't be much overhead. We can optimize the case of an empty set so that it is only a single if statement per refresh call.
|
So, this is a boolean column, tested for presence in a set. That means that the user cannot provide different values, permitting sorting, subsearching, etc. OK with everyone? If not, then I need provide a dict interface, where the caller gives me {id:val,...}
As for the empty set, I am not convinced that an 'if foo: xxx' is much faster than 'if id in some_empty_set'.