Files
last30days-skill/skills/last30days/scripts/lib
Ilia Alshanetsky e6b89f2644 perf: cache PreparedQuery per stream, skip double-normalize in dedupe (#282)
Scoring hot path (_normalize_score_dedupe) re-tokenized the same
ranking_query ~240x per stream: once per item for local_relevance,
plus ~5x per item across snippet windows. Query tokens are immutable
within a stream, so compute them once as relevance.PreparedQuery and
thread through signals.annotate_stream and snippet.extract_best_snippet.

dedupe._PreparedText called normalize_text twice: once in __init__ and
again via get_ngrams. Factor out _ngrams_of_normalized so the prepared
path skips the redundant pass while get_ngrams keeps its public contract.

Behavior unchanged.
2026-04-25 14:16:57 -07:00
..
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00