Skip to content

feat: add fast shallow headline parsing for search tools #1006

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

seflue
Copy link
Contributor

@seflue seflue commented Jul 2, 2025

Adds get_headlines_shallow() method that extracts only title/tags/level data without creating full OrgHeadline objects, avoiding expensive lazy loading for search tools.

Changes

  • Added get_headlines_shallow() method to OrgFile
  • Added _extract_shallow_headline_data() and _parse_headline_title() helpers
  • Added comprehensive tests for data structure, archives, and compatibility

Checklist

  • Followed Conventional Commits specification
  • Thoroughly tested my changes
  • Added tests and verified with make test

@seflue seflue force-pushed the feature/fast-headline-extraction-for-pickers branch from 9953e7a to d888b34 Compare July 2, 2025 06:12
Adds get_headlines_shallow() method to avoid expensive lazy loading when
search tools need only title/tags/level data across all agenda files.
@seflue seflue force-pushed the feature/fast-headline-extraction-for-pickers branch from d888b34 to 5c80417 Compare July 2, 2025 06:16
@kristijanhusak
Copy link
Member

@seflue did you check if it's actually any faster? Creating headline object does not parse any data from the document. It happens only when requested.

@seflue
Copy link
Contributor Author

seflue commented Jul 2, 2025

@kristijanhusak Thanks for the hint. I wasn't aware of that. Closing this.

@seflue seflue closed this Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants