-
-
Notifications
You must be signed in to change notification settings - Fork 397
Support enable/disable Favicons & use concurrency to speed up loading #3641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🥷 Code experts: onesounds, Yusyuriv Jack251970, onesounds have most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
This comment has been minimized.
This comment has been minimized.
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
📝 WalkthroughWalkthroughThis change introduces a new setting to enable or disable the loading of favicons for browser bookmarks in the plugin. Conditional logic is added to only load favicons if the setting is enabled. UI elements and localization for the new option are included, and error handling around file monitoring and cleanup is improved. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SettingsUI
participant Settings
participant BookmarkLoader
User->>SettingsUI: Toggles "Load favicons" checkbox
SettingsUI->>Settings: Updates EnableFavicons property
BookmarkLoader->>Settings: Checks EnableFavicons
alt EnableFavicons is true
BookmarkLoader->>BookmarkLoader: Load favicons for bookmarks
else EnableFavicons is false
BookmarkLoader->>BookmarkLoader: Skip favicon loading
end
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs (2)
44-53
: Consider consistency with Chromium loader error handling.The early return on file monitoring registration failure is more aggressive than the Chromium loader, which uses
continue
to skip problematic profiles. Consider whether users should still get bookmarks even if file monitoring fails.For consistency, consider this approach:
- return bookmarks; + // Continue loading bookmarks even if file monitoring fails + // Log the issue but don't prevent bookmark loading
107-110
: Good defensive programming, but consider consistency.The file existence check before deletion is defensive programming, though
File.Delete()
doesn't throw if the file doesn't exist. Note that the Chromium loader doesn't have this check - consider standardizing the approach across both loaders.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
(3 hunks)
🧰 Additional context used
🪛 GitHub Check: Check Spelling
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
[warning] 60-60:
Favicons
is not a recognized word. (unrecognized-spelling)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
[warning] 89-89:
Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 84-84:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 81-81:
favicons
is not a recognized word. (unrecognized-spelling)
🪛 GitHub Actions: Check Spelling
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
[warning] 60-60: Spell check warning: Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 130-130: Spell check warning: Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 177-177: Spell check warning: favicons
is not a recognized word. (unrecognized-spelling)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
[warning] 25-25: Spell check warning: moz
is not a recognized word. (unrecognized-spelling)
[warning] 26-26: Spell check warning: moz
is not a recognized word. (unrecognized-spelling)
[warning] 27-27: Spell check warning: moz
is not a recognized word. (unrecognized-spelling)
[warning] 28-28: Spell check warning: moz
is not a recognized word. (unrecognized-spelling)
[warning] 81-81: Spell check warning: favicons
is not a recognized word. (unrecognized-spelling)
[warning] 84-84: Spell check warning: favicons
is not a recognized word. (unrecognized-spelling)
[warning] 89-89: Spell check warning: Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 120-120: Spell check warning: Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 122-122: Spell check warning: tempfavicons
is not a recognized word. (unrecognized-spelling)
[warning] 137-137: Spell check warning: favicons
is not a recognized word. (unrecognized-spelling)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (14)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs (6)
46-46
: Good error handling improvement.The
continue
statement ensures that if bookmark file monitoring registration fails for one profile, the processing continues with the remaining profiles instead of completely failing. This is appropriate resilient behavior.
53-63
: Well-implemented conditional favicon loading.The conditional loading based on
EnableFavoriteIcons
setting properly addresses the performance concern mentioned in the PR objectives. The performance logging with stopwatch will help users understand the time impact of enabling favicons.🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 60-60:
Favicons
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 60-60: Spell check warning:
Favicons
is not a recognized word. (unrecognized-spelling)
46-46
: Good defensive programming improvement.Adding
continue
to skip the problematic profile when file monitoring registration fails is a sensible approach that improves error resilience.
55-57
: Efficient optimization of file system operations.Moving the favicon database path construction and file existence check inside the conditional block prevents unnecessary file system operations when favicons are disabled.
58-61
: Excellent addition of performance monitoring.The stopwatch logging provides valuable metrics for understanding the performance impact of favicon loading, supporting the optimization goals of this feature.
🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 60-60:
Favicons
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 60-60: Spell check warning:
Favicons
is not a recognized word. (unrecognized-spelling)
53-63
:❓ Verification inconclusive
Well-implemented conditional favicon loading.
The conditional loading based on
EnableFavoriteIcons
setting properly implements the performance optimization feature. The stopwatch logging provides valuable performance insights.Consider verifying thread safety of
Main._settings
access if this code runs in multi-threaded scenarios:
🏁 Script executed:
#!/bin/bash # Search for concurrent access patterns to Main._settings rg -A 3 -B 3 "Main\._settings" --type csLength of output: 10526
Approve conditional favicon loading with performance logging.
The added
EnableFavoriteIcons
guard cleanly implements the feature requirement and avoids unnecessary file I/O when favicons are disabled. Wrapping the load call inStopwatchLogInfo
will provide valuable insights into any performance bottlenecks.Files affected:
- Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
- Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
Consideration:
• If bookmark loading may execute off the UI thread, please verify that all access toMain._settings
(e.g.,EnableFavoriteIcons
) is safe under concurrent reads/writes or otherwise synchronized.🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 60-60:
Favicons
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 60-60: Spell check warning:
Favicons
is not a recognized word. (unrecognized-spelling)Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs (8)
44-53
: Good refactoring of error handling.Moving the bookmark file registration outside the main try block with dedicated error handling allows for early return if registration fails, which is more efficient than proceeding with bookmark loading when monitoring setup has already failed.
62-67
: Helpful clarifying comments.The added comments improve code readability by clearly explaining the purpose of each major step in the database connection and query execution process.
82-92
: Consistent implementation with Chromium loader.The conditional favicon loading logic matches the pattern implemented in
ChromiumBookmarkLoader.cs
, ensuring consistent behavior across different browser bookmark loaders. The performance logging will provide valuable metrics for users.🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 89-89:
Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 84-84:
favicons
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 84-84: Spell check warning:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 89-89: Spell check warning:
Favicons
is not a recognized word. (unrecognized-spelling)
107-110
: Defensive programming improvement.Adding the file existence check before deletion prevents potential exceptions if the temporary file was already deleted or never created, making the cleanup more robust.
62-70
: Good documentation improvements.The added comments improve code readability and make the database operations clearer for future maintainers.
81-92
: Consistent implementation of conditional favicon loading.The implementation matches the Chromium loader pattern and correctly implements the Firefox-specific favicon database path logic. The stopwatch logging provides valuable performance insights.
🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 89-89:
Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 84-84:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 81-81:
favicons
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 81-81: Spell check warning:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 84-84: Spell check warning:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 89-89: Spell check warning:
Favicons
is not a recognized word. (unrecognized-spelling)
94-95
: Helpful explanatory comments for connection cleanup.The comments clearly explain the necessity of explicit connection cleanup and provide a useful reference to the related issue.
81-89
: Static analysis spelling warnings are false positives.The spell check warnings for "favicons" and "moz" are false positives - these are legitimate technical terms in the context of browser bookmark management.
🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 89-89:
Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 84-84:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 81-81:
favicons
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 81-81: Spell check warning:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 84-84: Spell check warning:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 89-89: Spell check warning:
Favicons
is not a recognized word. (unrecognized-spelling)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, can you do me a favour for consistency, could you use favicons instead of favourite icons even for naming in the code please.
Will do. I do not realize it is a word😂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs (1)
160-224
: LGTM! Well-implemented concurrent processing with proper resource management.The concurrent implementation using
Parallel.ForEach
with individual read-only SQLite connections is excellent for performance while avoiding locking issues. The use ofConcurrentDictionary
for duplicate prevention and proper resource disposal in finally blocks shows good attention to thread safety and resource management.Consider adding clarifying comments for the return statements to improve readability:
var url = bookmark.Url; - if (string.IsNullOrEmpty(url)) return; + // Skip bookmarks with empty URLs as they cannot be processed + if (string.IsNullOrEmpty(url)) return; // Extract domain from URL - if (!Uri.TryCreate(url, UriKind.Absolute, out Uri uri)) - return; + // Skip bookmarks with invalid URLs that cannot be parsed + if (!Uri.TryCreate(url, UriKind.Absolute, out Uri uri)) + return;🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 184-184:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 163-163:
favicons
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 163-163:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 184-184:
favicons
is not a recognized word. (unrecognized-spelling)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
(4 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml
🧰 Additional context used
🧬 Code Graph Analysis (1)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs (2)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs (2)
Main
(16-258)Dispose
(245-248)Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs (2)
LoadFaviconsFromDb
(119-236)SaveBitmapData
(238-248)
🪛 GitHub Check: Check Spelling
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
[warning] 62-62:
Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 54-54:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 163-163:
favicons
is not a recognized word. (unrecognized-spelling)
🪛 GitHub Actions: Check Spelling
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
[warning] 54-54: favicons
is not a recognized word. (unrecognized-spelling)
[warning] 62-62: Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 132-132: Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 163-163: favicons
is not a recognized word. (unrecognized-spelling)
[warning] 184-184: favicons
is not a recognized word. (unrecognized-spelling)
🔇 Additional comments (3)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs (3)
1-2
: LGTM! Necessary imports for concurrent processing.The added using statements support the new concurrent favicon loading functionality with
ConcurrentDictionary
andParallel.ForEach
.Also applies to: 6-6
48-48
: LGTM! Improves robustness by continuing profile processing on failures.The continue statement ensures that if one profile fails to register file monitoring, other profiles can still be processed successfully.
55-65
: LGTM! Clean implementation of conditional favicon loading.The conditional logic properly implements the enable/disable functionality for favicon loading, includes appropriate file existence checks, and adds performance logging for monitoring load times.
🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 62-62:
Favicons
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 62-62:
Favicons
is not a recognized word. (unrecognized-spelling)
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
@jjw24 Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs (1)
173-173
: Clarify the purpose of early return statements.Consider adding a brief comment to explain that
return
statements in the parallel loop skip processing bookmarks with invalid URLs, as suggested in previous reviews.
🧹 Nitpick comments (1)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs (1)
44-53
: Consider less aggressive error handling for file monitoring registration.The early return on file monitoring registration failure means no bookmarks will be loaded if monitoring fails. Consider whether this is too restrictive - you might want to proceed with bookmark loading even if monitoring setup fails.
Apply this diff if you want to proceed with bookmark loading despite monitoring failures:
- return bookmarks; + // Continue with bookmark loading even if monitoring fails
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
(4 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
(7 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml
(1 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml
(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml
🚧 Files skipped from review as they are similar to previous changes (2)
- Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs
- Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml
🧰 Additional context used
🧬 Code Graph Analysis (1)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs (2)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs (2)
Main
(16-258)Dispose
(245-248)Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs (2)
LoadFaviconsFromDb
(119-236)SaveBitmapData
(238-248)
🪛 GitHub Actions: Check Spelling
Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
[warning] 27-27: moz
is not a recognized word. (unrecognized-spelling)
[warning] 28-28: moz
is not a recognized word. (unrecognized-spelling)
[warning] 29-29: moz
is not a recognized word. (unrecognized-spelling)
[warning] 30-30: moz
is not a recognized word. (unrecognized-spelling)
[warning] 81-81: Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 122-122: tempfavicons
is not a recognized word. (unrecognized-spelling)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
[warning] 54-54: favicons
is not a recognized word. (unrecognized-spelling)
[warning] 57-57: Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 60-60: favicons
is not a recognized word. (unrecognized-spelling)
[warning] 62-62: Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 132-132: Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 163-163: favicons
is not a recognized word. (unrecognized-spelling)
[warning] 184-184: favicons
is not a recognized word. (unrecognized-spelling)
🪛 GitHub Check: Check Spelling
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
[warning] 62-62:
Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 60-60:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 57-57:
Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 54-54:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 163-163:
favicons
is not a recognized word. (unrecognized-spelling)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (13)
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs (7)
1-6
: Imports correctly added for concurrent processing.The addition of
System.Collections.Concurrent
andSystem.Threading.Tasks
imports supports the new parallel favicon loading implementation.
47-49
: Improved error handling for file monitoring registration.The
continue
statement allows processing to continue with other browser profiles even if file monitoring registration fails for one profile, which is the correct behavior.
55-65
: Conditional favicon loading with performance monitoring implemented correctly.The favicon loading is now properly gated by the
EnableFavicons
setting and includes performance measurement via stopwatch logging. This addresses the performance concerns mentioned in the PR objectives.🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 62-62:
Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 60-60:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 57-57:
Favicons
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 57-57:
Favicons
is not a recognized word. (unrecognized-spelling)
[warning] 60-60:
favicons
is not a recognized word. (unrecognized-spelling)
[warning] 62-62:
Favicons
is not a recognized word. (unrecognized-spelling)
160-161
: Thread-safe duplicate prevention implemented correctly.Using
ConcurrentDictionary<string, bool>
to track saved favicon paths prevents duplicate file writes in the concurrent processing context.
164-168
: Concurrent processing with individual read-only connections.The parallel processing implementation correctly creates a separate read-only SQLite connection for each bookmark to avoid locking issues. This is a sound approach for concurrent database access.
205-209
: Duplicate favicon filtering implemented correctly.The
TryAdd
method onConcurrentDictionary
ensures thread-safe duplicate prevention, only saving favicons that haven't been processed before.
217-223
: Proper SQLite connection cleanup implemented.The finally block ensures proper resource cleanup with connection pool clearing, closing, and disposal. This addresses the EF Core issue referenced in the comment.
Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs (6)
1-6
: Imports correctly added for concurrent processing.The concurrent processing imports align with the parallel favicon loading implementation and are consistent with the ChromiumBookmarkLoader changes.
63-63
: Explicit read-only mode for database connection.Adding explicit
Mode=ReadOnly
to the connection string is a good practice that makes the intent clear and potentially provides performance benefits.
81-91
: Conditional favicon loading with performance monitoring implemented correctly.The favicon loading implementation matches the ChromiumBookmarkLoader pattern with proper setting checks and performance measurement.
🧰 Tools
🪛 GitHub Actions: Check Spelling
[warning] 81-81:
Favicons
is not a recognized word. (unrecognized-spelling)
128-143
: Comprehensive error handling for database file operations.The nested try-catch blocks properly handle both database copy failures and cleanup failures, with appropriate logging for debugging.
147-155
: Consistent concurrent processing implementation.The parallel processing pattern with
ConcurrentDictionary
and individual read-only connections mirrors the ChromiumBookmarkLoader implementation, ensuring consistency across browser types.
213-219
: Proper resource cleanup in concurrent context.The finally block ensures each connection is properly cleaned up with pool clearing, closing, and disposal, which is essential in the concurrent processing context.
Change
Support Enable / Disable Favorite Icons
Since favorite icon loading may consume much time (#3635), we should provide enable / disable button for them.
Resolve #3633, #3635.
Load favorite icons
. Favorite icons are loaded during startup & reload.%AppData\Roaming\FlowLauncher\Cache\Plugins\Flow.Launcher.Plugin.BrowserBookmark\FaviconCache
folder contains all favorite icons.Load favorite icons
. Favorite icons will not be loaded during startup & reload.%AppData\Roaming\FlowLauncher\Cache\Plugins\Flow.Launcher.Plugin.BrowserBookmark\FaviconCache
folder contains nothing.Use Concurrent Way to Load Favorite Icons
Since favorite icon loading may consume much time (#3635), we need to use concurrent method to load them.
Original:
After: