attempt to reduce the number of queries made by the session and context graphs