1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-12 07:04:00 +00:00

Performance and speed optimization

This commit is contained in:
Tw93
2025-12-08 15:34:51 +08:00
parent ea8488c1bb
commit 78e6743666
13 changed files with 366 additions and 552 deletions

View File

@@ -137,7 +137,7 @@ clean_orphaned_app_data() {
fi
# Check if app exists in our scan
if grep -q "^$bundle_id$" "$installed_bundles" 2> /dev/null; then
if grep -Fxq "$bundle_id" "$installed_bundles" 2> /dev/null; then
return 1
fi
@@ -231,7 +231,7 @@ clean_orphaned_app_data() {
if is_orphaned "$bundle_id" "$match"; then
# Use timeout to prevent du from hanging on network mounts or problematic paths
local size_kb
size_kb=$(run_with_timeout 5 get_path_size_kb "$match")
size_kb=$(get_path_size_kb "$match")
if [[ -z "$size_kb" || "$size_kb" == "0" ]]; then
continue
fi