Optimize ReadGraph.hasStatements(s,p) instead of directly using ReadGraph.getObjects(s,p)
ReadGraph.getObjects(s,p)
will directly realize the actual object results, which are not needed at all by hasStatements(s,p)
, only the information that they exist.