MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / methodAndFunctionNodes

Function methodAndFunctionNodes

src/resolution/callback-synthesizer.ts:192–195  ·  view source on GitHub ↗

* Stream method + function nodes lazily. The synthesizers only scan-and-filter * down to a tiny matched subset, so materializing every function/method (which * is gigabytes on a symbol-dense project) just to iterate it once is what OOM'd * #610. Iterating keeps memory O(1) in the node count.

(queries: QueryBuilder)

Source from the content-addressed store, hash-verified

190 * #610. Iterating keeps memory O(1) in the node count.
191 */
192function* methodAndFunctionNodes(queries: QueryBuilder): IterableIterator<Node> {
193 yield* queries.iterateNodesByKind('method');
194 yield* queries.iterateNodesByKind('function');
195}
196
197/** Phase 1: field-backed observer channels (registrar/dispatcher share a store). */
198async function fieldChannelEdges(queries: QueryBuilder, ctx: ResolutionContext, onYield: MaybeYield): Promise<Edge[]> {

Callers 2

fieldChannelEdgesFunction · 0.85
closureCollectionEdgesFunction · 0.85

Calls 1

iterateNodesByKindMethod · 0.65

Tested by

no test coverage detected