Directory Snapshot Method Using Split Filenames and Linked Lists
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Creating directory snapshots for large numbers of files is time-consuming and resource-intensive, especially when sorting filenames, which can impact application performance and memory usage.
Innovation Solution
The method involves splitting filenames into multiple temporary snapshot files, sorting each based on a heuristic, and creating a sorted linked list to efficiently store and compare snapshots, reducing memory usage and I/O operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If all filenames are loaded into memory for sorting, then sorting can be completed, but memory usage becomes prohibitively high
Solution Approach 1:
The patent divides the large set of filenames into multiple smaller batches, processing each batch separately. This segmentation allows sorting to be performed on manageable portions of data that fit within available memory, eliminating the need to load all filenames simultaneously into memory while still achieving complete sorted output.
Solution Approach 2:
The patent introduces a temporal dimension to the sorting process by using multiple passes over the data. Instead of attempting to sort all data in a single pass in memory, the system performs multiple sequential passes, each handling a portion of the data, thereby trading time for reduced memory requirements.
2Ease of manufacture
If a simple sorting method is used, then implementation is easy, but sorting time becomes prohibitively long for large directories
Solution Approach 1:
By dividing the sorting task into multiple smaller batches that can be processed independently and in parallel, the patent achieves both simplicity in implementation (each batch uses standard sorting) and reduced total sorting time (parallel processing of multiple batches).
Solution Approach 2:
The patent performs preliminary actions by pre-processing filenames into batches and preparing temporary files before the actual sorting operation. This preliminary organization enables more efficient subsequent sorting operations and allows for parallel processing, reducing overall sorting time while maintaining implementation simplicity.
3Reliability
If multiple passes are made over the directory to create snapshots, then complete snapshots are achieved, but disk I/O operations increase significantly
Solution Approach 1:
The patent segments the directory scanning process into multiple batches, where each batch processes a subset of filenames. This segmentation allows the system to create complete snapshots by processing portions of data sequentially, reducing the need for multiple full-directory passes and thereby minimizing disk I/O operations while maintaining snapshot completeness.
Data Source
AI summary
A system and method creates a directory snapshot. The method includes retrieving a group of filenames from a directory, splitting the group of filenames into a first plurality of filenames and a second plurality of filenames, and storing the first plurality of filenames into a first temporary snapshot file and storing the second plurality of filenames into a second temporary snapshot file. The filenames in the first and second temporary snapshot files are sorted based on the same heuristic and a sorted linked list that includes a filename listed first in the first temporary snapshot file and a filename listed first in the second temporary snapshot file is created. A first filename from the sorted linked list is saved to a result directory snapshot file.


