Skip to content

Explorer FTS Track 1a: Browser perf-smoke baseline #167

@rdhyee

Description

@rdhyee

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

  1. 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.
  2. 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

  • ?perf=1 panel shows search timings per invocation
  • tests/test_search_perf.py runs the canonical set and produces a JSON artifact
  • Baseline numbers recorded as a comment on this issue (cold + warm + bytes per query, plus the composition test result)
  • PR merged to isamplesorg/isamplesorg.github.io main

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestexplorerInteractive Explorer features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions