logs.gokuls.in

5 pull requests merged across 1 repo

bahdotsh/feedr

  • Use HashSet for read_items (O(1) lookups instead of O(n) linear scan)
  • Cache parsed dates, plain text, and lowercased titles on FeedItem/Feed structs during parsing to avoid repeated work per filter/render/search
  • Cache ColorScheme in App state instead of reconstructing every frame
  • Use static str slices for ASCII art instead of allocating Vec<String>
  • Use clone_from for filtered_dashboard_items to reuse allocation
  • Use pre-lowercased fields in search_feeds to avoid per-item allocations

Move feed loading out of App::new() and into background threads spawned after the TUI starts rendering. Uses std::sync::mpsc to send results back to the main loop, which drains them each tick and inserts feeds in bookmark order. The existing is_loading/loading indicator now shows during initial load. Also parallelizes load_bookmarked_feeds() and refresh_feeds() with per-domain rate limiting.

  • Show terminal cursor for both InsertUrl and SearchMode (was only InsertUrl, leaving SearchMode with no cursor at all)
  • Use chars().count() instead of len() for cursor positioning to handle multi-byte UTF-8 characters correctly
  • Clamp cursor x to input rect bounds to prevent overflow on long input
  • Document magic offset numbers for input rect positioning

Replace domain-pattern-matching heuristics with lookups against user-created FeedCategory entries in category filtering, available categories, and the FilterMode category cycling handler.