PathCairo should give back pointAtLength and length itself. Cairographics provides a cairo_copy_path_flat function that makes a copy of the current path, that just uese moveTo and lineTo. At the moment Cairo is using PathTraversalState. To implement the logic into Cairo directly can be a performance win. We would just need to calculate the distance between every sgementPoint and add it to the previous one.
We use a Path independent way to get pointAtLength and length now.