Femistoclus opened a new pull request, #1111:
URL: https://github.com/apache/iceberg-cpp/pull/1111

   `ToJsonList` and `ToJsonMap` folded with `std::accumulate` over a 
`nlohmann::json` init value while the lambda took `array_t` / `object_t` by 
value. Every step converted the accumulated JSON back to `array_t` / `object_t` 
and deep-copied all elements serialized so far, so serializing n items was 
O(n²).
   
   `ToJson(TableMetadata)` serializes `snapshots`, `snapshot-log` and 
`metadata-log` through these helpers, so writing table metadata was quadratic 
in the number of retained snapshots. Every commit writes a new metadata file, 
so tables with a long history paid this on each commit.
   
   Build the array/object directly instead. The output is unchanged (serialized 
table metadata is byte-identical).
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to