spmallette opened a new pull request, #3613:
URL: https://github.com/apache/tinkerpop/pull/3613

   The "Unnecessary Steps" section of the anti-patterns recipe correctly 
teaches the manual rewrites (`outE().inV()` to `out()`, and folding a counted 
adjacency onto its incident edges), and states that TinkerPop performs these 
rewrites automatically through optimization strategies. However the section 
gave a reader no way to confirm that claim, never named the strategies 
involved, and offered no pointer to further reading.
   
   This change addresses that gap:
   
   - Adds a runnable `explain()` example on the two original (unoptimized) 
queries so the optimizations are visible in the compiled traversal rather than 
taken on faith. The block is executed at doc-build time against the modern 
graph, so the transcript is real output.
   - Names the two strategies responsible: `IncidentToAdjacentStrategy` (which 
folds `outE("created").inV()` into a single `out("created")` step) and 
`AdjacentToIncidentStrategy` (which rewrites the counted adjacency back onto 
the incident edges), and explains how to read the strategy/category columns and 
the `Final Traversal` line.
   - Cross-references the `explain()` and `profile()` steps and the traversal 
strategies section of the reference documentation.
   
   The change is scoped to `docs/src/recipes/anti-patterns.asciidoc` (+26 
lines). The rendered recipes book was previewed locally to confirm the live 
`explain()` transcript renders and the new prose displays cleanly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to