perf: Arc-wrap SearchResultsDto for zero-copy cache reads
- Change SearchUseCase::search() return type to Arc<SearchResultsDto> - Replace Cache<u64, SearchResultsDto> with Cache<u64, Arc<SearchResultsDto>> - Eliminate .clone() on full result set; use Arc::clone() (ptr bump) - Remove Clone derive from SearchResultsDto (no longer needed) - Update handlers to deref Arc for JSON serialization
This commit is contained in:
@@ -156,7 +156,7 @@ pub struct SearchFolderResultDto {
|
||||
* both files and folders that match the search criteria, along with pagination
|
||||
* information and server-computed metadata.
|
||||
*/
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct SearchResultsDto {
|
||||
/// Files matching the search criteria (enriched with metadata)
|
||||
pub files: Vec<SearchFileResultDto>,
|
||||
|
||||
Reference in New Issue
Block a user