btashton edited a comment on pull request #2674: URL: https://github.com/apache/incubator-nuttx/pull/2674#issuecomment-761881757
> > I am wondering if it would be worth keeping a small buffer around 2-4 bytes that we could use instead of malloc free all of the time. This would save a lot of overhead for small transfers. > > I was thinking about something similar. > For NRF52832 we could even keep a buffer with the maxium supported length = 255. > But for NRF52840 it doesn't make sene because the maximum length of sent data can be 65535. > Another option is a buffer with a user-configurable length, and I think that's a pretty reasonable solution. I was thinking we keep it short and fall back on malloc because I would expect the large writes are usually going to be constrained to displays and memory devices which are already going to be slow on i2c and also tend to use more ram than say a small sensor. But I would be fine making it configurable with a default around 4 bytes which would cover 2 byte reads to a 16bit "address". Do you want me to create a PR for this after we merge this? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org