The tool for creating CartoType maps, makemap, has a command line option /route=yes which causes it to pre-calculate the route network and store it as part of the CTM1 file. This option is the default.

Doing this speeds up the calculation of the first route at run-time by a large factor - at least ten-fold.

Other choices:

/route=no:  don't create a route network in advance

/route=a: route network using the A-star routing system; same as /route=yes

/route=ag: create a route network using the A-star routing system, generating gradients from elevation data if possible (you need to use the /usgs option to get the elevation data)

/route=c:  create a route network using the contraction-hierarchy system, which minimises RAM use when calculating a route, but is less flexible (no route profile changes at run time).

/route=ch:  same as /route=c

/route=cg: create a route network using the contraction hierarchy routing system, generating gradients from elevation data if possible (you need to use the /usgs option to get the elevation data)