Files
kjvstudy.org/kjvstudy_org
kennethreitz 7522b27e7c Implement Phase 2 performance optimizations
1. Replace regex markdown with mistune library
   - Add mistune>=3.0.2 dependency
   - Replace custom regex patterns with proper markdown parser
   - Better performance and more robust parsing
   - Supports full markdown syntax (bold, italic, strikethrough, etc.)

2. Cache story counts
   - Cache get_story_count() and get_category_count()
   - Expected: 10-20x faster story index page loads
   - Added cache invalidation to refresh_stories()

3. Fix O(n) pattern in helpers.py
   - Replace manual chapter filtering with bible.get_chapters_for_book()
   - Uses existing @lru_cache for instant lookups

Combined expected improvement: 10-20% on story pages, faster markdown

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 12:06:13 -05:00
..