Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

bindings: type-faithful batched to_list() and more Java glue on the read paths #285

Closed

Description

@tae898

Follow-up to #243, #277, and #281: more Java glue for the read paths the examples and docs use. ResultSet.to_list() still converts every value in Python (about 2.4 microseconds per value through JPype), and to_json_list() is the fast path but changes types (DATE and DATETIME as epoch integers, DECIMAL as float), so it cannot replace to_list().

First measurement on a laptop P core, origin/main (617fe4d), 10,000 rows by 9 mixed columns (INTEGER, LONG, FLOAT, DOUBLE, STRING, BOOLEAN, DATE, DATETIME, DECIMAL), one process, warm: to_list() 235 ms, to_json_list() 24.6 ms (9.5x). 100 rows: to_list() 2.37 ms. One row: 82 us.

Plan:

  1. A type-faithful batched to_list(): Java serializes each batch as JSON with tags for the values JSON cannot carry exactly (BigDecimal, BigInteger, LocalDate, LocalDateTime, Instant and zoned values, sets), and anything else (RIDs, embedded documents, vertices, non-finite floats, non-string map keys) goes through a side table of the engine's own objects, so Python restores every value exactly as today. The parity test compares to_list() output (types and values) before and after for every property type.
  2. Measure and rank the other paths: iter_dicts() (batched prefetch that keeps streaming semantics), graph traversal, Document get/set and to_dict, vector search result handling, lookup_by_rid, and query().first(). Implement the ones where glue clearly wins.
  3. Update docs/guide/performance.md and the other pages that recommend slower patterns, in the same PR.

Measurement rules: timed runs on P cores 0 to 3 only, at least 7 interleaved rounds per arm, wall and CPU per operation, medians with min and max, package temperature and core_throttle_count deltas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions