For joern-knn, calculate only slice of distance matrix instead of complete distance matrix, allowing us to deal with much larger codebases timely.