Syknapse / Syknapse/Contribute-To-This-Project

Search: replace DOM-based search with pre-computed search index

Open
#4,508 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement performance priority:low
Dominant language
JavaScript
Stars
2.6k
Forks
3.5k
Avg merge
13h 14m
Merged PRs (30d)
32

Description

Blocked by

Issue "Refactor archive system: manifest + lazy loading + pre-computed contribution count" — implement only after that is stable.

Note

Future improvement. The lazy-loading refactor (above) solves full-archive search by fetching all files on search focus. This issue goes further: a pre-computed index makes search instant without downloading all archive JSON.

Problem

Even after the lazy-loading refactor, searching still means downloading all archive JSON (~10–13 MB, growing linearly). On slow mobile this is a poor experience.

Fix

At archive time, generate search-index.json alongside manifest.json:

[
  { "name": "Jane Doe", "about": "...", "handles": ["@jane"], "resources": ["title1", "title2"], "file": "archive_12.json" },
  ...
]

~200–400 KB for 4,500 cards — smaller than two archive files. Load eagerly on page open. Search runs against the index instantly. When a match points to an un-loaded archive file, fetch that specific file on demand to render the card.

Files

  • scripts/card-to-archive.js — updated to also generate search-index.json
  • archive/search-index.json — new (auto-generated)
  • assets/script.js — updated: load index eagerly, search against index, fetch specific archive files on match

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This work is blocked by the archive manifest and lazy-loading refactor, so confirm that dependency is stable first. Read scripts/card-to-archive.js and assets/script.js, then inspect archive/search-index.json generation and loading behavior. Done means the index is generated and loaded eagerly, searches run against it, and matching archive files are fetched on demand.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.