thriftpy
thriftpy copied to clipboard
Optionally use __slots__ for payload members
Fixes #198
- Add TSPayload for slot based structs
- Add new optional use_slots parameter to allow generating code with slots
- Cache slot based objects slightly differently to avoid cache poisoning
There are still a few questions and some cleanup to be done, but I think this should get the conversation started. /cc @dan-blanchard
Feature accepted. Update this issue later.
I have updated the implementation to support all types of objects as well as the recursive case. The service args and results are now created with slots as well.
This is now ready for review.