This issue unifies three related threads:
They are the same problem from three angles: the option exists mainly for
performance (#557), it is applied inconsistently (#1614), and the
long-term goal is to remove it (#1652) with as.integer() as the
replacement. Removal is blocked until the performance gap is closed — e.g.
max_cliques(sample_gnp(500, 0.15)) is ~8× slower with return.vs.es = TRUE
(268 ms vs 33 ms) because create_vs() builds names eagerly. The endorsed
direction is lazy (ALTREP) naming so igraph.vs/igraph.es is as cheap as a
numeric vector and names are materialized only on print/use.
Steps to close
Phase 0 — Close the performance gap (prerequisite)
Phase 1 — Decouple internal usage from the public option
Phase 2 — Soft-deprecate the option
Phase 3 — Remove
This issue unifies three related threads:
return.vs.esoption #1652 — remove thereturn.vs.esoption.return.vs.es#1614 — some functions ignorereturn.vs.es(consistency); partiallyaddressed by PR [WIP] Fix functions ignoring return.vs.es option #2439.
igraph.vs/igraph.esare much slower than plain edge lists/indices.They are the same problem from three angles: the option exists mainly for
performance (#557), it is applied inconsistently (#1614), and the
long-term goal is to remove it (#1652) with
as.integer()as thereplacement. Removal is blocked until the performance gap is closed — e.g.
max_cliques(sample_gnp(500, 0.15))is ~8× slower withreturn.vs.es = TRUE(268 ms vs 33 ms) because
create_vs()builds names eagerly. The endorseddirection is lazy (ALTREP) naming so
igraph.vs/igraph.esis as cheap as anumeric vector and names are materialized only on print/use.
Steps to close
Phase 0 — Close the performance gap (prerequisite)
create_vs()/create_es()andE()defer thenames/vnamesworkuntil printed or accessed.
max_cliques(sample_gnp(500, 0.15))with the defaultapproaches the old
return.vs.es = FALSEtiming. If the gap isn'tclosed, stop here — do not proceed to removal.
Phase 1 — Decouple internal usage from the public option
_impllayer a private numeric-output path that does not readreturn.vs.es.with_igraph_opt(list(return.vs.es = FALSE), ...)wrappers inall_simple_paths()andget_edge_ids()with that mechanism (nouser-visible change).
Phase 2 — Soft-deprecate the option
lifecycle::deprecate_warn()when a user setsreturn.vs.es,pointing to
as.integer()/as_ids().Phase 3 — Remove
if (igraph_opt("return.vs.es"))guard from theOUTCONVtemplates in
tools/stimulus/types-RR.yaml(keep thecreate_vs/create_esbody; keep thevcount() != 0guard forVERTEX_ROOT).R/aaa-*.Rfiles (103 sites) via codegen — do not hand-edit.return.vs.esfrom.igraph.parsand its doc entry inR/par.R;make the deprecated setter hard-error or no-op.
.Rdin CI).R CMD check; runtools/revdep.Rbefore release.