Snappy export product to graph.xml

Working with snappy, as others I’ve ran in some performance problems. Is there a way to export the generated graph of the product (like as xml), instead of calling the Productwriter?

That way i could created more elaborated workflows using snappy and in the end call gpt with an XML.

I’ve searched the api for that, and it appears to me that there is

org.esa.snap.core.gpf.graph.GraphIO

which can write a Graph to an XML, but is there a way to transform a product to a Graph?