mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Enhance matching module with reference identity and caching improvements
- Introduced a new `RefIdentity` type to store reference details (name and className) in the matching process. - Updated `VCache` and `SCache` structures to include references, improving the handling of reference comparisons during matching. - Modified `cacheVirtual` and `cacheStudio` functions to support reference caching, enhancing performance and accuracy in matching. - Improved `countOwnDiffs` function to account for reference mismatches, ensuring more precise cost calculations. - Added comprehensive tests to validate the new reference handling and caching mechanisms. These changes significantly enhance the efficiency and accuracy of the matching process in the application.
This commit is contained in:
parent
bf4aef6e94
commit
b687c8862d
12 changed files with 1401 additions and 61 deletions
|
|
@ -193,6 +193,7 @@ impl ServeSession {
|
|||
Arc::clone(&suppressed_paths),
|
||||
Arc::clone(&ref_path_index),
|
||||
root_project.folder_location().to_path_buf(),
|
||||
root_project.file_location.clone(),
|
||||
critical_error_receiver,
|
||||
git_repo_root.clone(),
|
||||
);
|
||||
|
|
@ -366,7 +367,7 @@ impl ServeSession {
|
|||
/// Does NOT apply corrections — the tree is left unchanged.
|
||||
pub fn check_tree_freshness(&self) -> TreeFreshnessReport {
|
||||
let start = Instant::now();
|
||||
let start_path = self.root_project.folder_location();
|
||||
let start_path: &Path = &self.root_project.file_location;
|
||||
let instance_context = InstanceContext::new();
|
||||
|
||||
let snapshot = match snapshot_from_vfs(&instance_context, &self.vfs, start_path) {
|
||||
|
|
@ -429,7 +430,7 @@ impl ServeSession {
|
|||
}
|
||||
|
||||
let start = Instant::now();
|
||||
let start_path = self.root_project.folder_location();
|
||||
let start_path: &Path = &self.root_project.file_location;
|
||||
let instance_context = InstanceContext::new();
|
||||
|
||||
let snapshot = match snapshot_from_vfs(&instance_context, &self.vfs, start_path) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue