Static QueryGraph for Sliding Window Map Matching improving performance

I’m working on an Android Java app that requires offline map matching of the car position as the car moves, like any GMaps or Uber app.
To do so, I call com.library.mapmatching.algorithm.MapMatching.doWork repeatedly with a sliding gpxList of Observations: each time the car moves, a new gpx is added to the list and the oldest is deleted.
This approach works, but it is too slow, as all the TransitionProbabilities corresponding to the gpxList need to be recalculated in each call and it is too time consuming.
To avoid 90% of all these repeated calculations and improve hugely the performance of this usual case, I would need to keep the last TransitionProbabilities cached. This needs that the VirtualEdges and VirtualNodes created from the gpxList keep the same IDs from one call to the next when they are the same.
This implies modifying QueryGraph.create and consequently QueryOverlayBuilder & QueryOverlay and keeping VirtualEdges and VirtualNodes static from one call to the next so that the previously created IDs are reused.
I don’t find any work related to this performance issue.
Has any work been done that could be used as a base point?
Or any other approach to this problem that I’m not seeing?
Anybody interested in working on this issue?

I’m not sure this is the easiest way to do this. Can you not cache the transition probabilities based on the gpx coordinates?