mirror of
https://github.com/thegeneralist01/archivr
synced 2026-12-04 18:56:44 +01:00
Accelerates tweet and thread archiving times by up to 11x on live Twitter and reduces processing overhead across Python and Rust: - In-memory GraphQL thread caching: parse and cache all tweets returned in TweetDetail conversation timeline (threaded_conversation_with_injections_v2), resolving parent/replied-to tweets in threads immediately without redundant network round-trips. - Proactive rate limiting: replace blind 2.0s post-save sleep with proactive throttling prior to outgoing HTTP requests, eliminating trailing sleep on single tweets and intermediate sleep for cached thread tweets. - HTTP keep-alive connection reuse: reuse scraper session for downloading media assets and avatars, avoiding fresh TCP/TLS handshakes per asset. - Avatar & media deduplication: skip avatar download if target file already exists on disk. - Lightweight client startup: introduce SimpleTwitterScraper using direct httpx.Client with authenticated headers and lazy twitter.scraper fallback, eliminating ~30ms of module imports at startup. - Fast JSON I/O: use orjson for binary JSON parsing and indented serialization. - Rust database batching: wrap entry creation, blob upserts, artifact registration, and run completion in a single SQLite transaction, reducing fsyncs from ~19 down to 1. - In-memory blob caching: cache blob records across tweet artifacts to avoid repeated filesystem metadata stats and duplicate upserts. - Single-pass staging: rewrite and move staged JSON files directly to raw_tweets/ in a single pass without intermediate staging writes. - Zero-copy metadata deserialization: use borrowed TweetJsonMetadata struct to extract title/metadata without dynamic Value heap allocations. - Regex fast paths: add substring gates before compiling/iterating asset regexes.
62 lines
988 B
Text
62 lines
988 B
Text
*
|
|
|
|
!.gitignore
|
|
!.github/
|
|
!.github/**
|
|
|
|
!docs/
|
|
!docs/LICENSE
|
|
!docs/README*
|
|
!docs/branding/
|
|
!docs/branding/**
|
|
# Dated design specs are tracked; docs/superpowers/plans/ stays ignored.
|
|
!docs/superpowers/
|
|
!docs/superpowers/specs/
|
|
!docs/superpowers/specs/**
|
|
!crates
|
|
!crates/**
|
|
# Static assets are built by Nix (frontendStatic derivation in flake.nix).
|
|
# Do not commit them; `nix build` produces them from frontend/src/.
|
|
crates/archivr-server/static/
|
|
crates/archivr-server/static/**
|
|
|
|
|
|
!vendor
|
|
!vendor/**
|
|
vendor/**/__pycache__/
|
|
vendor/**/__pycache__/**
|
|
vendor/**/*.pyc
|
|
|
|
!flake.nix
|
|
!flake.lock
|
|
|
|
!Cargo.toml
|
|
!Cargo.lock
|
|
!ARCHIVR-MENTAL-MODEL.md
|
|
!NEXT.md
|
|
!AGENTS.md
|
|
!CONTRIBUTING.md
|
|
!docs/ecosystem-change-checklist.md
|
|
|
|
!Dockerfile
|
|
!.dockerignore
|
|
!docker-compose.yml
|
|
!docker/
|
|
!docker/**
|
|
|
|
!modules/
|
|
!modules/**
|
|
|
|
!frontend/
|
|
!frontend/**
|
|
frontend/node_modules/
|
|
frontend/node_modules/**
|
|
frontend/result
|
|
frontend/result/**
|
|
frontend/dist/
|
|
frontend/dist/**
|
|
|
|
!autoresearch.sh
|
|
!benches/
|
|
!benches/**
|
|
.DS_Store
|