Save a QueryGraph for multiple uses?

Relating to a previous question, I’m creating a QueryGraph with a large number (millions) of snaps. My current platform (in Databricks, distributed cloud-computing) means that I’m re-generating this QueryGraph for each instance of GraphHopper that I’m initiating (once per data partition).

Is there a way to create my QueryGraph once, write it out, and then read it in to my GraphHopper instances directly? I’m thinking a similar approach to how we generate the BaseGraph “graph-cache” once to be re-used rather than generating from scratch it every time.

You can surely try to (de)serialize it using the internal DataAccess classes we use to serialize the graph. See the DataAccessTest to see how it could be used.