You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Native first reply: first() pays for 256 JSON-encoded rows, and the head of a columnar read is built in Python (left by #331) #381
On the native wheel, query(...).first() and every small result pay for up to 256 rows. The first reply of a query is JSON and carries up to _FIRST_BATCH = 256 rows: Java encodes them all in execImpl (native/src/main/java/org/humemai/nativelib/ArcadeNative.java:241, replyOf at :600) even when the caller wants one row, and NativeResultSet builds a deque(zip(rows, meta)) from them (src/arcadedb/_native/database.py:204-230). The JVM wheel reads one row for first() (RowAccess.firstAndClose). I read this at the tag 26.11.1.post2: #331 (native column frames, in post1 and post2) did not touch it.
#331 also left the head of a columnar read on the JSON path: a result of 256 rows or fewer never uses a column frame, and colframes._head_frame (src/arcadedb/_native/colframes.py:160-181) builds the head frame column by column in Python.
What is measured
The only timings are from 26.11.1, before #331, in the large-result study (native time over JVM time, above 1 means the native wheel is slower; only figures that pass the study's rule are listed):
table
rows
native / JVM, 95% interval
run
vec128
1M
3.58 [3.41, 3.69]
ab2
vec768
100k
9.26 [8.93, 9.52]
ab2
vec768
1M
9.43 [9.17, 9.52]
ab2
wide
100k
11.49 [11.24, 11.49]
ab3
These are baseline figures of 26.11.1 and are not measured on post2. I read the post2 code path as unchanged, so I expect the cost to be there, and I will measure it on post2 before claiming a size.
Work
Encode the first reply lazily: for first() and one() ask for one row, and let a query that is read as a whole keep the batch.
Retire colframes._head_frame: the head rows should arrive as a frame like the rest, so one decoder path covers a whole result.
Retire the old row path (_drain_dicts) once nothing calls it, so there is one path per type.
Method: a timed A/B of a candidate wheel against 26.11.1.post2 with an A/A control, on the figures above and on the small-result case, before any claim. Part of #315.
Activity