n42n / n3n

Peer to Peer VPN
51 stars 6 forks source link

JsonRPC needs pagination support #38

Open hamishcoleman opened 2 weeks ago

hamishcoleman commented 2 weeks ago

Some of the management API calls can generate enough data to overflow the internal buffer used. Simply increasing this buffer is not reasonable as it can leave a lot of RAM in unused buffers. Dynamically allocating the buffer is also not possible - firstly, the total size of the JSON data is not known until after it has been rendered and secondly these buffer objects are intended to remove memory allocations from the normal path.

The alternative to resizing the buffer is to implement a paginated interface to these APIs.