Kovid, my thinking is that testing for presence of annotations requires fetching the annotations from the database. I understand why it is that way; you can't efficiently cache something that is changed by external programs, but building the result set has a cost. On the other hand, a "has_annotations" that does a "select count" would not construct the result set and probably be reasonably efficient. This could possibly be cached where the cache is invalided whenever a full annotation fetch is done, but I am not sure of the value of doing that.
What do you think?
BTW: I am finally back and can start working on my backlog.
Kovid, my thinking is that testing for presence of annotations requires fetching the annotations from the database. I understand why it is that way; you can't efficiently cache something that is changed by external programs, but building the result set has a cost. On the other hand, a "has_annotations" that does a "select count" would not construct the result set and probably be reasonably efficient. This could possibly be cached where the cache is invalided whenever a full annotation fetch is done, but I am not sure of the value of doing that.
What do you think?
BTW: I am finally back and can start working on my backlog.