Skip to content

JVM GraphBatch: create_vertices and new_edges cross rows of exact scalars as typed columns, RIDs back as a long[] (refs #388) - #391

Merged
tae898 merged 5 commits into
mainfrom
perf/388-jvm-graph-batch-typed
Nov 22, 2026
Merged

tae898 merged 5 commits into
mainfrom
perf/388-jvm-graph-batch-typed

Conversation

@tae898

@tae898 tae898 commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

On the JVM wheel, GraphBatch.create_vertices sent every chunk of rows as one JSON text (VertexBatcher.createVerticesJson): Python wrote the text, the engine parsed it into a JSONObject per row, a map per row was built from it, and the created RIDs came back as one ;-joined text that Python split. GraphBatch.new_edges with properties did the same through EdgeBatcher.newEdgesJson, and Python first built one dict per edge to carry the endpoints beside the properties.

Now rows that are all dicts with the same keys in the same order, each property holding one kind of int, float, bool or str (with None for a null), plus the float vectors that already crossed as a FloatVectors.Matrix, cross as one typed column per property, in the layout of DocumentBatcher.insertColumns (long[], double[], boolean[], StringColumn, with a boolean[] of null rows for a column that has a null). The new bridge methods are VertexBatcher.createVerticesColumns and EdgeBatcher.newEdgesColumns. They make the same engine call the text route made (GraphBatch.createVertices(type, Object[][]) and newEdge(src, type, dst, props...)), with the same name and value per property, so the batch settings (WAL, commit size, parallel flush, retries) apply as before. The RIDs of the vertices come back as one long[] of [bucket id, position] pairs, which Python turns into the same "#12:345" texts, in the same order, as before. The new edge call keeps the RIDs as the two joined texts of newEdgesJoined, which is one bulk copy each.

What keeps the old routes, so no input changes meaning: rows that are None or have other keys or another key order, a property that holds a list, tuple, dict, date-time, date, Decimal or bytes, a column of mixed kinds (an int beside a float or a bool), a numpy scalar, a subclass, an integer beyond 64 bits, a NaN, an infinity, a subnormal, a lone surrogate, and an edge property named _src or _dst. Those go to the JSON text route or to the property-matrix route exactly as they did, per chunk for vertices and for the whole call for edges (every edge chunk is built before the first crosses, so a chunk the typed route cannot carry starts the old route over with nothing buffered). Edges whose property dicts are all empty or None now use newEdgesJoined, the call for edges without properties, which stores the same edges.

One stored type is kept on purpose: the engine's JSON parser turns a number token that fits an int into an Integer, so the text route stored a small Python int of an undeclared property as INTEGER, while the per-element paths and insert_columns store LONG. The typed route boxes a long that fits an int as an Integer too, so the stored class does not change with the route. Whether the two should be unified is a separate decision.

Related issues

Refs #388 and #315.

Performance changes

Measured with a paired A/B on the mini: arcadedb-jvm 26.11.1.post4 with graph_batch.py and the bridge jar swapped per arm (the jar compiled from each arm's src/java against the wheel's own jars): A is the tip of main 076d6d5674, B is this PR 5c04af32fb, C is A again as the control. 16 rounds, one JVM and one fresh database per arm and round, 8 warm-up cycles then 30 timed cycles, the trimmed mean of the timings per case, a bootstrap 95% interval over the rounds, and the rule of #317, read row by row: a row counts only when its own control is inside 0.97 to 1.03. The process was confined to the two cores of one compare lane of the mini (Cpus_allowed_list: 0,2), no other study ran, and the host worker recorded 0 ms of thermal throttle. B is the tip 5c04af32fb; the run before it was on 4b64b81f9b, and its B/A is in the last column.

Case Rows per call A, µs per row B, µs per row B/A (95% interval) Control C/A Reading B/A in the run before (tip 4b64b81)
v_l2_1 1 68.997 70.767 1.032 (0.983 to 1.117) 1.050 not read: control outside 0.97 to 1.03 1.054 (control not read)
v_l2_16 16 7.714 8.132 1.025 (1.005 to 1.094) 1.014 not read: control outside 0.97 to 1.03 1.038 (control not read)
v_l2_32 32 5.477 5.540 1.021 (0.964 to 1.065) 1.013 not read: control outside 0.97 to 1.03 1.007 (control not read)
v_l2_64 64 4.237 4.355 1.009 (0.989 to 1.062) 1.024 not read: control outside 0.97 to 1.03 1.004 (control not read)
v_l2_100 100 3.958 4.049 1.020 (0.989 to 1.051) 1.017 not read: control outside 0.97 to 1.03 1.014 (control not read)
v_l2_256 256 3.414 3.479 1.020 (0.993 to 1.049) 1.007 not read: control outside 0.97 to 1.03 1.001 (control not read)
v_l2_512 512 3.209 3.070 0.948 (0.936 to 0.977) 1.000 not read: control outside 0.97 to 1.03 0.937 (control not read)
v_l2_5000 5,000 3.083 2.640 0.866 (0.847 to 0.877) 1.011 not read: control outside 0.97 to 1.03 0.853
v_e2_50000 50,000 4.865 4.135 0.851 (0.825 to 0.870) 1.007 not read: control outside 0.97 to 1.03 0.853 (control not read)
v_e2_500000 500,000 4.971 4.178 0.844 (0.819 to 0.879) 1.018 not read: control outside 0.97 to 1.03 0.846 (control not read)
v_l3d_10000 10,000 4.281 3.968 0.926 (0.911 to 0.938) 1.000 not read: control outside 0.97 to 1.03 0.918
e_since_1 1 16.680 17.312 1.039 (1.023 to 1.047) 1.003 GRAY 1.051
e_since_16 16 3.787 3.800 1.003 (0.989 to 1.015) 0.995 NO CHANGE 1.031
e_since_32 32 3.285 1.881 0.569 (0.562 to 0.575) 0.995 WIN 0.562
e_since_64 64 3.028 1.439 0.476 (0.468 to 0.482) 0.994 WIN 0.467
e_since_100 100 2.909 1.255 0.432 (0.428 to 0.441) 0.993 WIN 0.420
e_since_5000 5,000 2.653 0.789 0.299 (0.288 to 0.304) 1.004 WIN 0.297
e_empty_100 100 2.163 0.765 0.352 (0.345 to 0.363) 0.994 WIN 0.352
e_empty_5000 5,000 1.844 0.568 0.309 (0.300 to 0.316) 1.003 WIN 0.307
e_vertex_100 100 7.939 5.941 0.746 (0.741 to 0.765) 0.999 WIN 0.755
e_vertex_5000 5,000 7.602 5.271 0.689 (0.683 to 0.707) 1.002 WIN 0.696
c_edges_plain_5000 5,000 0.537 0.505 0.950 (0.919 to 0.992) 0.954 not read: control outside 0.97 to 1.03 1.041 (control not read)
c_count_5000 5,000 2.736 2.717 0.993 (0.965 to 1.023) 0.997 GRAY 0.999 (control not read)
c_list_5000 5,000 5.413 5.445 1.013 (0.991 to 1.027) 1.008 not read: control outside 0.97 to 1.03 1.069
c_list_first_5000 5,000 3.432 3.443 1.005 (0.990 to 1.025) 1.021 not read: control outside 0.97 to 1.03 -
c_list_row4000_5000 5,000 3.437 3.592 1.052 (1.029 to 1.066) 1.004 not read: control outside 0.97 to 1.03 -
c_list_last_5000 5,000 3.419 3.569 1.046 (1.029 to 1.066) 1.009 not read: control outside 0.97 to 1.03 -
e_since_1_calls2000 1 14.428 14.672 1.016 (1.003 to 1.034) 0.998 GRAY -
  • Edges, from the floor of 32 edges per call: all 8 rows have a readable control and read WIN, B/A 0.299 to 0.746. With an int property the time per edge is 0.299 to 0.569 of A from 32 edges up; with no property in the dicts (newEdgesJoined) 0.352 and 0.309; with Vertex objects as ends 0.746 and 0.689.
  • Vertices, from the floor of 512 rows per call: B/A is 0.844 to 0.948 over the 5 rows, and it is below 1 in the run before as well. By the rule these rows are mostly not read: in this run 0 of the 5 have a readable control, and in the run before 2 (v_l2_5000 0.853 (0.835 to 0.870), v_l3d_10000 0.918 (0.899 to 0.949)). The controls of these rows (A against A) read up to 1.018 in this run, so I report the size of the effect and not a verdict.
  • Below the floor, vertices (1 to 256 rows): B/A is 1.009 to 1.032 over 6 rows, 0 of them with a readable control. These rows take the old route in both arms, and the code B adds on that path is a length comparison per call; I cannot call them unchanged from this run.
  • Below the floor, edges: a call of 1 edge with a property reads 1.039 (1.023 to 1.047) with a readable control (GRAY), 0.63 µs on a call of 16.7 µs, and 1.051 (1.026 to 1.059) in the run before; 2,000 calls of 1 edge per timing read 1.016 (1.003 to 1.034) (0.24 µs on 14.4 µs, GRAY). A call of 16 edges reads 1.003 (0.989 to 1.015), NO CHANGE (it was 1.031 (1.022 to 1.037) before). Every call with properties now runs any(properties) and a length test before the old path; I did not isolate the cost to them. I left it, because any(properties) is also what sends [{}] * n to newEdgesJoined at every size.
  • The controls that must not move: c_count_5000 (create_vertices(type, 5000)) reads 0.993 (0.965 to 1.023) with a readable control (GRAY, the interval is a little wider than the band); c_edges_plain_5000 has no readable control. A list in the first row (the refusal at the first value) reads 1.005 (0.990 to 1.025) and a list in every row 1.013 (0.991 to 1.027), both with a control outside the band; the run before read the list in every row at 1.069 (1.058 to 1.106) with a readable control, which is why the first-row refusal was added.
  • A list in a late row keeps the text route after the types of the columns are read once: 1.052 (1.029 to 1.066) for row 4,000 and 1.046 (1.029 to 1.066) for the last row of 5,000, with a control outside the band, so I do not read them. A refusal that has to look at every row costs a pass over the columns; I take the 4.6% to 5.2% of these two rows as the size of that cost, with the control caveat.
  • Memory, information only: the peak resident memory of the process after the one call of 500,000 rows is 5.66 GiB for A, 6.27 GiB for B and 5.74 GiB for C (the median of each arm over the rounds); the median over the rounds of B over A within one round is 1.059 after the call and 1.037 before it, and the resident memory after the call 1.026. C, which is A again, is 1.015 times A after the call and 1.062 times A before it (medians): the control moves by as much as B does before the call, so I do not read a memory effect from this run.
  • 16 of the 28 counted rows have a control outside the band, so the study's own exit status is 3; I read only the rows with a readable control (12).
  • Counted, not timed: the stored records and their digest are equal in every arm of every round, the returned RID texts are equal, and the typed route is taken from 512 rows (vertices) and 32 edges per call.

Limits: one host and two runs of 16 rounds (the earlier one on tip 4b64b81, before the refusal fix); the JVM wheel only, the native GraphBatch is a separate change; the two floors come from a probe on the mini's efficiency cores (the table in graph_batch.py), and the rows at the floor and one size below it are the check of it.

What the change allocates, per chunk of n rows and k scalar properties: one temporary list of n references per property, one numpy array and its long[] or double[] copy (8 bytes per value; n bytes for a bool), a StringColumn for a str property (the UTF-8 bytes and 4 * (n + 1) bytes of offsets, as insert_columns makes), a boolean[] of n for a property with a null, and n temporary key tuples for the same-keys check. The JSON text (one string of the whole chunk, then its UTF-8 copy), the parsed JSONArray with a JSONObject and a map per row, and the joined RID text are no longer allocated. The Object[n][2k] matrix the engine takes is built as before. The returned RIDs are a long[2 * n] (16 bytes per vertex) before the list of n texts. For edges, the columns of every chunk of the call are held until it ends (about 8 bytes per numeric value of the call), where the text route held one dict per edge for the whole call.

Docs

docs/modules/ROOT/pages/how-to/bulk-loads.adoc (the paragraph on the property values of create_vertices and new_edges) and the docstrings of create_vertices say which rows cross as typed columns.

How I checked it

The tests are in the first commit and the change in the second, so a run of the first commit shows them failing on the old code.

tests/test_graph_batch_typed_jvm.py (JVM wheel only, listed in NATIVE_NOT_APPLICABLE): crossing counts (one createVerticesColumns or newEdgesColumns call per chunk, none of the JSON calls, no property-matrix fallback), the returned RIDs against SELECT @rid in row order and against the text route, parity of the stored records (typed route against the text route switched off) for vertices, vertices with vectors, a batch of one, a load over the chunk boundary and edges, and a test for every shape that keeps the text or matrix route (twelve vertex shapes, five edge shapes, a chunk that is not carried among carried ones, and the whole call going the old way for edges). The expectations of tests/test_graph_batch_vector_crossings_jvm.py move from createVerticesJson to createVerticesColumns, because the shapes there are now carried. uvx pre-commit run --files <changed files> and Bandit as CI runs it are clean. No native build is involved: the change is the bridge jar and graph_batch.py, and the native wheel has its own GraphBatch.

Checklist

  • A regression test fails on the old code and passes on the new
  • The test suite that the change can affect passes
  • uvx pre-commit run --files <changed files> passes

@tae898 tae898 added python Pull requests that update python code performance Speed or memory of the bindings, with a measurement jvm The arcadedb-jvm package (JPype build) labels Nov 14, 2026
@tae898 tae898 self-assigned this Nov 14, 2026
tae898 and others added 3 commits November 23, 2026 03:45
…float vectors as typed columns, RIDs back as a long[] (refs #388, #315)

The crossing tests count VertexBatcher.createVerticesColumns and EdgeBatcher.newEdgesColumns calls per chunk, the parity tests store the same rows through the typed route and through the JSON text route (the typed route switched off) and compare the property order and the Java class and text of every stored value, and every shape the typed route cannot carry is pinned to the route it keeps. These fail on 26.11.1.post3, where neither bridge method exists.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…alars and float vectors as typed columns, and the RIDs come back as a long[] (refs #388, #315)

VertexBatcher.createVerticesColumns and EdgeBatcher.newEdgesColumns take the layout of DocumentBatcher.insertColumns (long[], double[], boolean[], StringColumn, FloatVectors.Matrix, with null flags) and make the engine call the JSON text route made, with the same key and value per property. A long that fits an int is boxed as an Integer, as the engine's JSON parser did, so the stored class is unchanged. Rows that are not all dicts of the same keys in the same order, or hold a value other than one kind of int, float, bool or str per property, keep the JSON text route.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ext, and the stored-record helper tolerates an edge without an id (refs #388)

The first test read @Rid back through SQL and looked the texts up in that dict, which did not hold them under the same keys; it now loads each returned RID through the database and compares the id. The edge shape test with a None among dicts has an edge without an id, which the helper's sort key did not allow for.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@tae898
tae898 force-pushed the perf/388-jvm-graph-batch-typed branch from 1c6d9f9 to 8bd2487 Compare November 22, 2026 18:46
…vertices and 32 edges for new_edges (refs #388, #315)

The typed route builds the names array, the columns array and one bridge array per column on every call, and a StringColumn per str column, a fixed cost the JSON text does not have. A probe of both routes of this branch on the mini (cores 18 and 19, one process, the typed route forced off by making _scalar_columns answer None) found the typed route slower for a call of one row by 1.2 to 3.2 times for create_vertices and 1.5 to 3.8 times for new_edges. The crossovers differ by operation and shape. The first size where no probed shape is slower and none is slower above it is 32 edges for new_edges and 512 rows for create_vertices (the string-heavy l2 shapes are at 1.00 and 1.07 at 256 rows).

A call of fewer rows (edges) keeps the old route, counted over the whole call and not per chunk, so a call over the floor crosses every one of its chunks typed. Edges with only empty property dicts keep newEdgesJoined at every size. The probe table is in the comment of the two constants. The routes of the calls below and at the floors are counted in new tests (never timed); the existing route tests switch the floors off, since they are about which shapes cross typed. The docs paragraph and the docstring of create_vertices say so.
…re any column is built (refs #388, #315)

The first timed run of the study (ab391-r1) found create_vertices of 5,000 rows with a list-valued property, above the floor, 6.9 percent slower than before (B/A 1.069 [1.058, 1.106], control 1.004): _scalar_columns checked the shapes of all rows, then built the bridge array of every column in order (a long[] for id, a StringColumn for name) and only at the tags column found the list that cannot be typed, and threw the arrays away. A probe on the mini (one process, the old and the new code side by side) put that at 3.1 to 3.3 ms per call of 5,000 rows.

Now the first row is looked at first (a value of a type no typed column holds refuses the call there), then the types of every column are decided one after the other from the types alone (_column_kind), and only when every column is carried is a bridge array built (_build_column). A list in the first row, or in every row, costs 0.001 ms. A list in a late row costs one pass over the types, 1.1 ms per 5,000 rows (a third of before). A carried call costs what it did: 3.80 ms against 3.77 ms. What the typed route accepts and refuses is unchanged (_scalar_column keeps its contract as the two steps in a row).

The cost below the edge floor (e_since_1 1.051, e_since_16 1.031) is not a scan: before the floor test new_edges runs only `not any(properties)` (it stops at the first dict that holds a property) and the length compare, 0.4 to 0.5 microseconds per call in one process with the three versions side by side on one glue jar; the rest of the 0.8 and 2 microseconds of the study is not in the Python code, so the order of the checks is left as it is.

New tests count the calls that read and build columns (never time): a list in the first row builds nothing and reads no column, a list in a late row decides three columns and builds none, rows of another shape build none, a carried call decides and builds every column, a call below either floor reads no column.
@tae898

tae898 commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator Author

This is the result after the fix that the first run asked for (a call that the typed route cannot carry is now refused at the first value, before any column is built). Setup: arcadedb-jvm 26.11.1.post4 with graph_batch.py and the bridge jar swapped per arm (the jar compiled from each arm's src/java against the wheel's own jars): A is the tip of main 076d6d5674, B is this PR 5c04af32fb, C is A again as the control. 16 rounds, one JVM and one fresh database per arm and round, 8 warm-up cycles then 30 timed cycles, the trimmed mean of the timings per case, a bootstrap 95% interval over the rounds, and the rule of #317, read row by row: a row counts only when its own control is inside 0.97 to 1.03. The process was confined to the two cores of one compare lane of the mini (Cpus_allowed_list: 0,2), no other study ran, and the host worker recorded 0 ms of thermal throttle. B is the tip 5c04af32fb; the run before it was on 4b64b81f9b, and its B/A is in the last column.

Case Rows per call A, µs per row B, µs per row B/A (95% interval) Control C/A Reading B/A in the run before (tip 4b64b81)
v_l2_1 1 68.997 70.767 1.032 (0.983 to 1.117) 1.050 not read: control outside 0.97 to 1.03 1.054 (control not read)
v_l2_16 16 7.714 8.132 1.025 (1.005 to 1.094) 1.014 not read: control outside 0.97 to 1.03 1.038 (control not read)
v_l2_32 32 5.477 5.540 1.021 (0.964 to 1.065) 1.013 not read: control outside 0.97 to 1.03 1.007 (control not read)
v_l2_64 64 4.237 4.355 1.009 (0.989 to 1.062) 1.024 not read: control outside 0.97 to 1.03 1.004 (control not read)
v_l2_100 100 3.958 4.049 1.020 (0.989 to 1.051) 1.017 not read: control outside 0.97 to 1.03 1.014 (control not read)
v_l2_256 256 3.414 3.479 1.020 (0.993 to 1.049) 1.007 not read: control outside 0.97 to 1.03 1.001 (control not read)
v_l2_512 512 3.209 3.070 0.948 (0.936 to 0.977) 1.000 not read: control outside 0.97 to 1.03 0.937 (control not read)
v_l2_5000 5,000 3.083 2.640 0.866 (0.847 to 0.877) 1.011 not read: control outside 0.97 to 1.03 0.853
v_e2_50000 50,000 4.865 4.135 0.851 (0.825 to 0.870) 1.007 not read: control outside 0.97 to 1.03 0.853 (control not read)
v_e2_500000 500,000 4.971 4.178 0.844 (0.819 to 0.879) 1.018 not read: control outside 0.97 to 1.03 0.846 (control not read)
v_l3d_10000 10,000 4.281 3.968 0.926 (0.911 to 0.938) 1.000 not read: control outside 0.97 to 1.03 0.918
e_since_1 1 16.680 17.312 1.039 (1.023 to 1.047) 1.003 GRAY 1.051
e_since_16 16 3.787 3.800 1.003 (0.989 to 1.015) 0.995 NO CHANGE 1.031
e_since_32 32 3.285 1.881 0.569 (0.562 to 0.575) 0.995 WIN 0.562
e_since_64 64 3.028 1.439 0.476 (0.468 to 0.482) 0.994 WIN 0.467
e_since_100 100 2.909 1.255 0.432 (0.428 to 0.441) 0.993 WIN 0.420
e_since_5000 5,000 2.653 0.789 0.299 (0.288 to 0.304) 1.004 WIN 0.297
e_empty_100 100 2.163 0.765 0.352 (0.345 to 0.363) 0.994 WIN 0.352
e_empty_5000 5,000 1.844 0.568 0.309 (0.300 to 0.316) 1.003 WIN 0.307
e_vertex_100 100 7.939 5.941 0.746 (0.741 to 0.765) 0.999 WIN 0.755
e_vertex_5000 5,000 7.602 5.271 0.689 (0.683 to 0.707) 1.002 WIN 0.696
c_edges_plain_5000 5,000 0.537 0.505 0.950 (0.919 to 0.992) 0.954 not read: control outside 0.97 to 1.03 1.041 (control not read)
c_count_5000 5,000 2.736 2.717 0.993 (0.965 to 1.023) 0.997 GRAY 0.999 (control not read)
c_list_5000 5,000 5.413 5.445 1.013 (0.991 to 1.027) 1.008 not read: control outside 0.97 to 1.03 1.069
c_list_first_5000 5,000 3.432 3.443 1.005 (0.990 to 1.025) 1.021 not read: control outside 0.97 to 1.03 -
c_list_row4000_5000 5,000 3.437 3.592 1.052 (1.029 to 1.066) 1.004 not read: control outside 0.97 to 1.03 -
c_list_last_5000 5,000 3.419 3.569 1.046 (1.029 to 1.066) 1.009 not read: control outside 0.97 to 1.03 -
e_since_1_calls2000 1 14.428 14.672 1.016 (1.003 to 1.034) 0.998 GRAY -
  • Edges, from the floor of 32 edges per call: all 8 rows have a readable control and read WIN, B/A 0.299 to 0.746. With an int property the time per edge is 0.299 to 0.569 of A from 32 edges up; with no property in the dicts (newEdgesJoined) 0.352 and 0.309; with Vertex objects as ends 0.746 and 0.689.
  • Vertices, from the floor of 512 rows per call: B/A is 0.844 to 0.948 over the 5 rows, and it is below 1 in the run before as well. By the rule these rows are mostly not read: in this run 0 of the 5 have a readable control, and in the run before 2 (v_l2_5000 0.853 (0.835 to 0.870), v_l3d_10000 0.918 (0.899 to 0.949)). The controls of these rows (A against A) read up to 1.018 in this run, so I report the size of the effect and not a verdict.
  • Below the floor, vertices (1 to 256 rows): B/A is 1.009 to 1.032 over 6 rows, 0 of them with a readable control. These rows take the old route in both arms, and the code B adds on that path is a length comparison per call; I cannot call them unchanged from this run.
  • Below the floor, edges: a call of 1 edge with a property reads 1.039 (1.023 to 1.047) with a readable control (GRAY), 0.63 µs on a call of 16.7 µs, and 1.051 (1.026 to 1.059) in the run before; 2,000 calls of 1 edge per timing read 1.016 (1.003 to 1.034) (0.24 µs on 14.4 µs, GRAY). A call of 16 edges reads 1.003 (0.989 to 1.015), NO CHANGE (it was 1.031 (1.022 to 1.037) before). Every call with properties now runs any(properties) and a length test before the old path; I did not isolate the cost to them. I left it, because any(properties) is also what sends [{}] * n to newEdgesJoined at every size.
  • The controls that must not move: c_count_5000 (create_vertices(type, 5000)) reads 0.993 (0.965 to 1.023) with a readable control (GRAY, the interval is a little wider than the band); c_edges_plain_5000 has no readable control. A list in the first row (the refusal at the first value) reads 1.005 (0.990 to 1.025) and a list in every row 1.013 (0.991 to 1.027), both with a control outside the band; the run before read the list in every row at 1.069 (1.058 to 1.106) with a readable control, which is why the first-row refusal was added.
  • A list in a late row keeps the text route after the types of the columns are read once: 1.052 (1.029 to 1.066) for row 4,000 and 1.046 (1.029 to 1.066) for the last row of 5,000, with a control outside the band, so I do not read them. A refusal that has to look at every row costs a pass over the columns; I take the 4.6% to 5.2% of these two rows as the size of that cost, with the control caveat.
  • Memory, information only: the peak resident memory of the process after the one call of 500,000 rows is 5.66 GiB for A, 6.27 GiB for B and 5.74 GiB for C (the median of each arm over the rounds); the median over the rounds of B over A within one round is 1.059 after the call and 1.037 before it, and the resident memory after the call 1.026. C, which is A again, is 1.015 times A after the call and 1.062 times A before it (medians): the control moves by as much as B does before the call, so I do not read a memory effect from this run.
  • 16 of the 28 counted rows have a control outside the band, so the study's own exit status is 3; I read only the rows with a readable control (12).
  • Counted, not timed: the stored records and their digest are equal in every arm of every round, the returned RID texts are equal, and the typed route is taken from 512 rows (vertices) and 32 edges per call.

Limits: one host and two runs of 16 rounds (the earlier one on tip 4b64b81, before the refusal fix); the JVM wheel only, the native GraphBatch is a separate change; the two floors come from a probe on the mini's efficiency cores (the table in graph_batch.py), and the rows at the floor and one size below it are the check of it.

I am updating the description with this and taking the PR out of draft so CI runs on it.

@tae898 tae898 added this to the 26.12.1 milestone Nov 22, 2026
@tae898
tae898 marked this pull request as ready for review November 22, 2026 22:17
@tae898
tae898 merged commit ab482ac into main Nov 22, 2026
41 checks passed
@tae898
tae898 deleted the perf/388-jvm-graph-batch-typed branch November 22, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jvm The arcadedb-jvm package (JPype build) performance Speed or memory of the bindings, with a measurement python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant