Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid ByteBuffer copies when reading nested MapBuffers (#44436)
Summary: Pull Request resolved: #44436 The backing buffer behind `ReadableMapBuffer` is effectively immutable, so we can make reads of nested MapBuffers work on an inline view of the same buffer. This book-keeping is kept within ReadableMapBuffer (we can not user `ByteBuffer.wrap()` because the fbjni produces ByteBuffer is not array backed). The main downside I can think of is that the whole buffer is kept in memory until all children buffers leave, but current use-cases don't involve long-term storage of MapBuffer children, so this is probably a better tradeoff. Changelog: [Internal] Reviewed By: javache Differential Revision: D57020759 fbshipit-source-id: d2f5a76561fa4a4219fe5022ba62cc96f56ce022
- Loading branch information