Sub-issue of #165. No upstream dependencies.
Goal
Establish a measured browser-side baseline for the current live search (samples_map_lite.parquet, label + place_name, ILIKE) before changing anything. Subsequent tracks compare against these numbers, not against speculation.
Scope
-
Extend ?perf=1 instrumentation in explorer.qmd to log search timings.
- Wrap
doSearch() (explorer.qmd:1782-1859) with performance.mark('search-<id>-start') / performance.mark('search-<id>-end') / performance.measure('search', ...).
- Capture: query string, terms count, results count, elapsed ms, and (best-effort) bytes transferred via
performance.getEntriesByType('resource') filtered to the parquet URL within the search window.
- Surface in the existing perf panel.
-
Add a Playwright perf benchmark in tests/.
- File:
tests/test_search_perf.py (new; sibling to tests/test_globe.py).
- Run the canonical query set (below) against the deployed site at
https://isamples.org/explorer.html?perf=1.
- Record: cold first-search latency, warm repeat-search latency, transferred bytes, results count, whether composition with active source/facet filters works.
- Output:
tests/search_baseline_<YYYY-MM-DD>.json artifact for future-track comparison.
Canonical query set (locked)
| label |
query |
expected behavior |
single-common |
pottery |
many results; cold + warm timings |
single-rare |
basalt |
mid-volume results |
multi-term |
pottery Cyprus |
AND semantics; tests multi-term path |
no-hit |
xyzzyqqqplugh |
zero results path |
wildcard-literal |
100% |
literal % handling via escapeIlikePattern |
wildcard-literal |
_test |
literal _ handling |
diacritic |
Çatalhöyük |
NFKC + diacritic-strip behavior under current ILIKE (likely zero hits) |
composed-filter |
pottery + source=OPENCONTEXT only + material=<one URI> |
source + facet composition still works |
Acceptance
Out of scope
- No code-path change to
doSearch() beyond instrumentation. The interim honesty fix (swap to sample_facets_v2.parquet or update docs) is #N2 / Track 1b and depends on these numbers.
Refs
#165, #164, PR #166
Sub-issue of #165. No upstream dependencies.
Goal
Establish a measured browser-side baseline for the current live search (
samples_map_lite.parquet,label + place_name, ILIKE) before changing anything. Subsequent tracks compare against these numbers, not against speculation.Scope
Extend
?perf=1instrumentation inexplorer.qmdto log search timings.doSearch()(explorer.qmd:1782-1859) withperformance.mark('search-<id>-start')/performance.mark('search-<id>-end')/performance.measure('search', ...).performance.getEntriesByType('resource')filtered to the parquet URL within the search window.Add a Playwright perf benchmark in
tests/.tests/test_search_perf.py(new; sibling totests/test_globe.py).https://isamples.org/explorer.html?perf=1.tests/search_baseline_<YYYY-MM-DD>.jsonartifact for future-track comparison.Canonical query set (locked)
single-commonpotterysingle-rarebasaltmulti-termpottery Cyprusno-hitxyzzyqqqplughwildcard-literal100%%handling viaescapeIlikePatternwildcard-literal_test_handlingdiacriticÇatalhöyükcomposed-filterpottery+ source=OPENCONTEXT only + material=<one URI>Acceptance
?perf=1panel shows search timings per invocationtests/test_search_perf.pyruns the canonical set and produces a JSON artifactisamplesorg/isamplesorg.github.iomainOut of scope
doSearch()beyond instrumentation. The interim honesty fix (swap tosample_facets_v2.parquetor update docs) is #N2 / Track 1b and depends on these numbers.Refs
#165, #164, PR #166