Dead code removal 3#79
Conversation
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
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
|
Warning Review limit reached
More reviews will be available in 52 minutes and 46 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR systematically removes unused extension methods, instance lookup patterns, and settings operations while introducing performance optimizations through caching, precomputation of lookups, and elimination of exception-based control flow. Changes span extension APIs, service layers, and UI download filtering logic. ChangesAPI Cleanup and Performance Optimization
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
Release Notes
Refactoring
Removed Features