mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
add some notes about making this more efficient
This commit is contained in:
parent
665e7dce51
commit
d9bffb3556
1 changed files with 7 additions and 0 deletions
|
|
@ -1405,6 +1405,13 @@ fn wrapped_main() -> ! {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optimized bulk data read handler. See lib.rs for documentation.
|
// Optimized bulk data read handler. See lib.rs for documentation.
|
||||||
|
// TO INVESTIGATE: probably serialization can be made a lot more efficient by
|
||||||
|
// using a `BufferSerializer` instead of a WriteSeriaizer. I think we can also
|
||||||
|
// stack multiple records into the buffer without having to re-allocate the serializer,
|
||||||
|
// but it's not clear to me how the deserialization would work in that case. The main
|
||||||
|
// problem of using the BufferSerializer is the interior mutability problem of re-using the
|
||||||
|
// allocated slice across multiple iterations of the loop, especially with the property where
|
||||||
|
// if the record doesn't fit we want to stash it elsewhere for use on the next iteration.
|
||||||
Opcode::DictBulkRead => {
|
Opcode::DictBulkRead => {
|
||||||
const BULKREAD_TIMEOUT_MS: u64 = 5000;
|
const BULKREAD_TIMEOUT_MS: u64 = 5000;
|
||||||
let range = msg.body.memory_message_mut().unwrap();
|
let range = msg.body.memory_message_mut().unwrap();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue