You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: remove dead code and fix double client.close() bug
Dead code removal:
- Remove DateTimeX.timestamp getter (unused)
- Remove GhIdX.markdownLink getter (unused)
- Remove Pfs.separator and Pfs.homeDir (unused)
- Remove SettingsService.applySpeedSettingsToBuiltin() (unused)
- Remove 28 unused individual Settings.set*() methods (setRpcListenPort,
setRpcSecret, setMaxConcurrentDownloads, setSplit, etc.) - only setBtTracker
and setLastSyncTrackerTime are used by TrackerSyncService
Bug fix:
- Remove redundant client.close() in try block of file selection save handler;
the finally block already handles cleanup, causing double-close on success
* perf: optimize hot-path allocations and exception-based control flow
Performance:
- Cache RegExp as static finals in TaskDetailsBtHelpers (azureus pattern,
digit/letter patterns) instead of recompiling per-peer per-second
- Cache UnmodifiableListView in DownloadDataService.tasks getter (was
creating a new wrapper on every access, dozens of times per second)
- Precompute lowercase names map before sort in _compareTasks (eliminates
O(n log n) toLowerCase() allocations per refresh cycle)
- Precompute lowercase instance names map before search filtering (saves
1x toLowerCase() per task per keystroke)
- Replace firstWhere+catch with simple for-loop in getInstanceById and
getBuiltinInstance (avoids expensive stack trace capture for control flow)
- Use getBuiltinInstance() in initialize() instead of bare firstWhere
0 commit comments