mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
Implement new recursive change-count matching algorithm for instance reconciliation
- Introduced a comprehensive rewrite of the matching algorithm, replacing the previous multi-pass approach with a recursive change-count scoring function and greedy assignment strategy. - Updated the `hydrate.lua` and `matching.lua` files to utilize the new algorithm, enhancing the efficiency of instance matching during hydration. - Documented the new algorithm's structure, including fast-paths for Ref pins and (Name, ClassName) grouping, which significantly improve matching accuracy and performance. - Ensured that the new implementation maintains compatibility with existing systems while providing a more robust solution for handling ambiguous instances. These changes enhance the clarity and efficiency of the reconciliation process, paving the way for improved project management and user experience.
This commit is contained in:
parent
4cb45cd607
commit
1a1d9ce886
14 changed files with 1047 additions and 1108 deletions
|
|
@ -251,11 +251,8 @@ pub fn syncback_dir_no_meta<'sync>(
|
|||
|
||||
// Process matched pairs: preserve existing filesystem assignment.
|
||||
for (new_ref, old_ref) in &sorted_matched {
|
||||
let (child_snap, _needs_meta, dedup_key) = snapshot.with_joined_path(
|
||||
*new_ref,
|
||||
Some(*old_ref),
|
||||
&taken_names,
|
||||
)?;
|
||||
let (child_snap, _needs_meta, dedup_key) =
|
||||
snapshot.with_joined_path(*new_ref, Some(*old_ref), &taken_names)?;
|
||||
taken_names.insert(dedup_key.to_lowercase());
|
||||
children.push(child_snap);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ use crate::{
|
|||
},
|
||||
snapshot_middleware::Middleware,
|
||||
syncback::{
|
||||
filter_properties, inst_path, name_needs_slugify, slugify_name,
|
||||
FsSnapshot, SyncbackReturn, SyncbackSnapshot,
|
||||
filter_properties, inst_path, name_needs_slugify, slugify_name, FsSnapshot, SyncbackReturn,
|
||||
SyncbackSnapshot,
|
||||
},
|
||||
variant_eq::variant_eq,
|
||||
RojoRef,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue