Skip to content

Speed up existing devcontainer database lookups#11

Open
n4p68vc6p9-hub wants to merge 1 commit into
nibzard:mainfrom
n4p68vc6p9-hub:codex-speed-up-db-cache-24
Open

Speed up existing devcontainer database lookups#11
n4p68vc6p9-hub wants to merge 1 commit into
nibzard:mainfrom
n4p68vc6p9-hub:codex-speed-up-db-cache-24

Conversation

@n4p68vc6p9-hub

@n4p68vc6p9-hub n4p68vc6p9-hub commented Jun 24, 2026

Copy link
Copy Markdown

/claim #24

Related bounty issue: https://github.com/daytonaio/devcontainer-generator/issues/24

Summary

  • Return cached database results before traversing the GitHub repository when a devcontainer entry already exists.
  • Cache positive check_url_exists lookups for a short TTL (DEVCONTAINER_DB_CACHE_SECONDS, default 300) to avoid repeated Supabase queries for frequently requested repositories.
  • Narrow the Supabase select list to only the fields needed for the response.
  • Extract shared result rendering into render_devcontainer_result so database, repository, and generated responses use the same UI path.

Why

Issue #24 asks to speed up returning existing database entries and reduce redundant database queries. The previous flow checked the database but still fetched repository context before returning existing records, so existing entries still paid the slower GitHub traversal path. This PR returns existing database records immediately and caches repeated positive lookups.

Notes

  • regenerate=true bypasses the cache and refreshes the stored result.
  • Cache entries are invalidated after insert/regeneration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant