Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

perf(basket): parallelize batch ingest and memoize Geo/UA lookups

Aperta
#862 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

@sundaram2021 ci sta già lavorando.

Dal 21/9/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start in apps/basket/src/routes/basket.ts, reading the batch handler at lines 572-611 and getBatchVisitorCountry around line 561. Trace checkForBot, validateEventSchema, processTrackEventData, getGeo, and parseUserAgent before changing the batch flow. Done means batch work is parallelized and lookups are reused while preserving result ordering and bot-ignore semantics.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Basket batch ingest processes events serially and repeats GeoIP + UA parsing per event, limiting throughput on large batches.

What's the issue

In apps/basket/src/routes/basket.ts:572-611, the batch handler loops with await checkForBot, await validateEventSchema, await processTrackEventData per event. processTrackEventData does Promise.all([getGeo(ip), parseUserAgent()]) per item, so a 50-event batch pays 50x GeoIP + UA + bot scans serially. Only the outgoing_link path memoizes via getBatchVisitorCountry:561.

Proposed fix

  • Validate schemas in chunked parallel batches (e.g. Promise.allSettled, size 10).
  • Memoize getGeo + parseUserAgent by distinct (ip, ua) key per batch request.
  • Keep per-event result ordering and bot-ignore semantics.
Lingua principale
TypeScript
Stelle
1.2k
Fork
227
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.