perf(gfql): hop's full loop re-dedups the accumulated matches every hop (O(hops × matches)) on labeled / min_hops shapes

Aperta
#2,047 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
performance

Direzione di ricerca

Start with the full-loop accumulation in graphistry/compute/hop.py around lines 632 and 685–695, then compare its visited-set accounting with the fast loop around lines 566–576. Run the hop semantics and rediscovery suites to preserve behavior, and extend test_hop_scaling_pin.py with a 4-hop labeled shape. Done means the labeled case’s cost stays a bounded multiple of the fast loop without changing hop results.

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

Descrizione

Found in the #2036 dedup audit. graphistry/compute/hop.py full loop (the path taken when fast_path_enabled is off or the shape needs edge/node hop labels or min_hops) accumulates results with concat([matches_edges, hop_edges[[EDGE_ID]]]).drop_duplicates(subset=[EDGE_ID]) (hop.py ~632) and the same pattern for node labels (~685/695) on every hop, so each hop pays a hash pass over everything matched so far: O(H × M) for H hops. The fast loop already keeps visited sets (_domain_union / _domain_diff, hop.py ~566-576) and only touches the new frontier.

Not a wrong answer (contracts pinned by the hop semantics and rediscovery suites); a cost class distinct from #2036's removed O(E) dedup. Fix shape: move the full loop to the same visited-set accounting and pin it by extending test_hop_scaling_pin.py to a 4-hop labeled shape (cost must stay a bounded multiple of the fast loop). Owner priority: after the 0.60 stacks land.

Lingua principale
Python
Stelle
2.6k
Fork
229
Merge medio
1g 5h
PR unite (30g)
99

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.

Altre issue di graphistry/pygraphistry

Tutte le issue di graphistry/pygraphistry

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.