File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/typegraph/optimize/src Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0.
2
2
// SPDX-License-Identifier: MPL-2.0
3
3
4
+ /**
5
+ * This crate implement the optimization step for the serialized typegraph.
6
+ * It runs in three steps.
7
+ * - Step 1: We run the Kosaraju's algorithm to partition the graph (only the
8
+ * type related vertices) into strongly connected components.
9
+ * - Step 2: We assign a bucket for each type, according to its hash. The
10
+ * hash function does not currently try to deduplicate types that belong
11
+ * in a strongly connected component of size larger than one.
12
+ * - Step 3: To each bucket is assigned a type index, then we translate all
13
+ * the type references in the typegraph into the new type indices.
14
+ */
4
15
mod dedup;
5
16
mod kosaraju;
6
17
You can’t perform that action at this time.
0 commit comments