Search caps the browser response at 50 days, but the database query still transfers the complete journal_search_text, scripture_search_text, and scripture_reference_search_text values for every matching row before the application cuts a 240-character excerpt. Large pasted entries can therefore turn a small result page into tens of megabytes of database transfer and process allocation.
Move excerpt generation close enough to PostgreSQL that the query returns bounded result text. Seed 50 matching rows whose three projection columns grow from small entries to multi-megabyte entries. Record returned query bytes, p95 latency over 100 warm runs, and peak process-heap delta before and after the change. The acceptance bound is at most 64 KiB of returned projection or excerpt text for 50 hits, independent of the stored entry size; latency and heap must no longer grow with the complete projection values.
Deferred from PR #23 because the row count is capped and the blocking privacy, error-boundary, tokenizer, normalization, and result-attribution defects take precedence.
Search caps the browser response at 50 days, but the database query still transfers the complete
journal_search_text,scripture_search_text, andscripture_reference_search_textvalues for every matching row before the application cuts a 240-character excerpt. Large pasted entries can therefore turn a small result page into tens of megabytes of database transfer and process allocation.Move excerpt generation close enough to PostgreSQL that the query returns bounded result text. Seed 50 matching rows whose three projection columns grow from small entries to multi-megabyte entries. Record returned query bytes, p95 latency over 100 warm runs, and peak process-heap delta before and after the change. The acceptance bound is at most 64 KiB of returned projection or excerpt text for 50 hits, independent of the stored entry size; latency and heap must no longer grow with the complete projection values.
Deferred from PR #23 because the row count is capped and the blocking privacy, error-boundary, tokenizer, normalization, and result-attribution defects take precedence.