@@ -969,27 +969,6 @@ jsonAnalyzeSortPaths(JsonAnalyzeContext *ctx)
969
969
JsonPathStatsCompare );
970
970
}
971
971
972
- /*
973
- * jsonAnalyzePaths
974
- * Sort the paths and calculate statistics for each of them.
975
- *
976
- * Now that we're done with processing the documents, we sort the paths
977
- * we extracted and calculate stats for each of them.
978
- *
979
- * XXX I wonder if we could do this in two phases, to maybe not collect
980
- * (or even accumulate) values for paths that are not interesting.
981
- */
982
- static void
983
- jsonAnalyzePaths (JsonAnalyzeContext * ctx )
984
- {
985
- int i ;
986
-
987
- jsonAnalyzeSortPaths (ctx );
988
-
989
- for (i = 0 ; i < ctx -> npaths ; i ++ )
990
- jsonAnalyzePath (ctx , ctx -> paths [i ]);
991
- }
992
-
993
972
/*
994
973
* jsonAnalyzeBuildPathStatsArray
995
974
* ???
@@ -1218,7 +1197,18 @@ compute_json_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
1218
1197
{
1219
1198
/* Collect all values of all paths */
1220
1199
jsonAnalyzePass (& ctx , jsonAnalyzeCollectPaths , (void * )(intptr_t ) true);
1221
- jsonAnalyzePaths (& ctx );
1200
+
1201
+ /*
1202
+ * Now that we're done with processing the documents, we sort the paths
1203
+ * we extracted and calculate stats for each of them.
1204
+ *
1205
+ * XXX I wonder if we could do this in two phases, to maybe not collect
1206
+ * (or even accumulate) values for paths that are not interesting.
1207
+ */
1208
+ jsonAnalyzeSortPaths (& ctx );
1209
+
1210
+ for (int i = 0 ; i < ctx .npaths ; i ++ )
1211
+ jsonAnalyzePath (& ctx , ctx .paths [i ]);
1222
1212
}
1223
1213
else
1224
1214
{
0 commit comments