Hi hackers,
Many thanks for the feedback and all the great suggestions!
I decided to add the patch to the nearest commitfest. You will find it in the attachment.
Differences from the GitHub version:
- Code formatting changed;
- More comments added to the code;
- SGML documentation added;
- Plus several minor changes;
I very much like the ideas:
- To use varint, as Tomas suggested
- Make dictionaries variable in size
- Somehow avoid calling gettimeofday()
- Improvements by 2ndQuadrant that Andrew named
However, I would like to decompose the task into 1) deciding if the extension is worth adding to /contrib/ and 2) improving it. Since there are people who already use ZSON, the extension should be backward-compatible with the current ZSON format anyway. Also, every improvement deserves its own discussion, testing, and benchmarking. Thus I believe the suggested approach will simplify the job for reviewers, and also save us time if the patch will be declined. If the patch will be accepted, I will be delighted to submit follow-up patches!
If you have any other ideas on how the extension can be improved in the future, please don't hesitate to name them in this thread. Also, I would appreciate some code review.
--
Best regards,
Aleksander Alekseev