Reuse Fuse instance for episode search - #149
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
chhoumann
added a commit
that referenced
this pull request
Nov 24, 2025
chhoumann
added a commit
that referenced
this pull request
Nov 24, 2025
* feat: Add transcription queue for episodes (#132) * feat: Add volume control to player (#133) * fix: mount views with svelte api (#134) * fix: Reserve image space and use native lazy load (#138) * Reserve image space and use native lazy load * Fix image loading attribute type * fix: fix Obsidian listener accumulation (#141) * feaet: Optimize latest episodes aggregation (#142) * fix: Add keys to podcast lists (#136) * fix: Stabilize episode list layout (#139) * style: move inline podcast styles into CSS (#145) * fix: persist hide-played toggle (#144) * feat: Optimize latest episodes updates (#143) * refactor: Remove redundant currentTime sync (#147) * fix: Replace moment date formatting in episode list (#148) * feat: Stream feed loading in PodcastView (#140) * Improve podcast feed initial loading * Guard feed search before cache ready * fix: Optimize Fuse reuse in search (#149) * feat: Improve topbar focus contrast (#150) * feat: Add live input handling for episode search (#135) * fix: Use Intl formatter for episode dates (#153) * feat: Improve nav cues and native lazy images (#152) * feat: Improve podcast loading feedback (#151) * fix: guard obsidian inputs from feedback loops (#154) * fix: settings corruption
Contributor
|
🎉 This PR is included in version 2.15.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
chhoumann
added a commit
that referenced
this pull request
Jun 29, 2026
* fix(feed): parse the feed once per getEpisodes call getEpisodes fetched and parsed the feed twice on a cold call: once via getFeed (to populate channel metadata) and again directly to read the items. This doubled the network round-trips and XML parses on every cold path, e.g. the URIHandler resume-link flow that constructs a FeedParser with no cached feed. Fetch and parse the document a single time and reuse it for both the channel metadata and the episode items. The metadata extraction moves to a private extractFeed(body, url) helper that getFeed and getEpisodes both call, so behavior (metadata population, the "Invalid RSS feed" guard, this.feed caching) is unchanged - only the redundant second fetch is removed. Resolves deepsec finding other-redundant-fetch. * fix(search): rebuild the Fuse cache on content change, not just length The Fuse search index was cached in a WeakMap keyed by the episodes array and reused whenever the cached size matched the array length. Length is a weak fingerprint: the same array reference mutated in place at the same length (an entry swapped or edited) would return the stale index built from the old contents. Validate the cache with a content signature (a JSON-framed list of each episode's title and streamUrl) instead of length, so any content or ordering change rebuilds the index while an unchanged list keeps reusing it across keystrokes (preserving the #149 optimization). Adds the first unit tests for searchEpisodes, including a Fuse-construction spy proving the index is reused when unchanged and rebuilt when the content changes. Resolves deepsec finding other-stale-cache.
github-actions Bot
pushed a commit
that referenced
this pull request
Jul 9, 2026
## [2.17.3](2.17.2...2.17.3) (2026-07-09) ### Bug Fixes * **feed/search:** parse feed once + content-based search cache ([#225](#225)) ([053d51f](053d51f)), closes [#149](#149) * make episode identity key collision-resistant and prototype-safe ([#226](#226)) ([a5683db](a5683db)) * **opml:** correct import progress math and saved-count reporting ([#221](#221)) ([a79e529](a79e529)) * **security:** validate feed/URI URLs and cap download size ([#223](#223)) ([edef281](edef281)) * **template:** neutralize feed-controlled note injection ([#228](#228)) ([ef4ecbd](ef4ecbd)) * **timestamp:** escape live table-cell pipe after an escaped backslash ([#227](#227)) ([a34dfca](a34dfca)) * **transcription:** resolve three deepsec transcription-pipeline bugs ([#224](#224)) ([83c34e7](83c34e7))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:\n- memoize Fuse instances per episode list to avoid rebuilding on each query\n- refresh cached index when the list size changes