Optimize vocabularies RDF output generating Refs #17834