Evaluate adding Registry.crawl(until=URI)

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
performance

Research direction

Start at the Registry.crawl entry point and review how crawl(until=None) currently processes uncrawled resources. Establish the requested benchmarks before changing behavior, then determine how an optional URI target and any trie-based lookup would affect the design. Done means the target can stop crawling when found, while the default still crawls all uncrawled resources and benchmark results are recorded.

Written by the indexing model from the issue text.

Description

This is a potential performance enhancement / laziness enhancement -- we could stop crawling a registry when a particular URI of desire is found -- perhaps relatedly we could store crawled URIs in a trie or something so we go directly to the most likely location to find the resource (e.g. look in http://example.com/foo first if we're looking for http://example.com/foo/bar).

crawl(until=None) (the default) would crawl the entire set of uncrawled resources, i.e. the current behavior.

Doing this should first come with some benchmarking.

Dominant language
Python
Stars
56
Forks
55
Avg merge
5d 22h
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from python-jsonschema/referencing

All issues in python-jsonschema/referencing

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.