@@ -209,7 +209,7 @@ impl<VatId> Drop for QuestionRef<VatId> {
209
209
match & mut questions. slots [ self . id as usize ] {
210
210
Some ( q) => {
211
211
if let Ok ( ref mut c) = * self . connection_state . connection . borrow_mut ( ) {
212
- let mut message = c. new_outgoing_message ( 100 ) ; // XXX size hint
212
+ let mut message = c. new_outgoing_message ( 5 ) ;
213
213
{
214
214
let root: message:: Builder = message. get_body ( ) . unwrap ( ) . init_as ( ) ;
215
215
let mut builder = root. init_finish ( ) ;
@@ -629,7 +629,7 @@ impl<VatId> ConnectionState<VatId> {
629
629
}
630
630
match * state. connection . borrow_mut ( ) {
631
631
Ok ( ref mut c) => {
632
- let mut message = c. new_outgoing_message ( 100 ) ; // TODO estimate size
632
+ let mut message = c. new_outgoing_message ( 5 ) ;
633
633
{
634
634
let mut builder = message
635
635
. get_body ( )
@@ -739,7 +739,7 @@ impl<VatId> ConnectionState<VatId> {
739
739
return Ok ( ( ) ) ;
740
740
}
741
741
742
- let mut response = connection_state. new_outgoing_message ( 50 ) ?; // XXX size hint
742
+ let mut response = connection_state. new_outgoing_message ( 10 ) ?;
743
743
744
744
let result_exports = {
745
745
let mut ret = response
@@ -1761,7 +1761,7 @@ where
1761
1761
_size_hint : Option < :: capnp:: MessageSize > ,
1762
1762
target : Client < VatId > ,
1763
1763
) -> :: capnp:: Result < Self > {
1764
- let message = connection_state. new_outgoing_message ( 100 ) ?;
1764
+ let message = connection_state. new_outgoing_message ( 1024 ) ?;
1765
1765
Ok ( Self {
1766
1766
connection_state,
1767
1767
target,
@@ -2392,7 +2392,7 @@ impl ResultsDone {
2392
2392
if let Ok ( connection) =
2393
2393
connection_state. connection . borrow_mut ( ) . as_mut ( )
2394
2394
{
2395
- let mut message = connection. new_outgoing_message ( 50 ) ; // XXX size hint
2395
+ let mut message = connection. new_outgoing_message ( 10 ) ;
2396
2396
{
2397
2397
let root: message:: Builder =
2398
2398
message. get_body ( ) ?. get_as ( ) ?;
@@ -2627,7 +2627,7 @@ impl<VatId> Drop for ImportClient<VatId> {
2627
2627
// Send a message releasing our remote references.
2628
2628
let mut tmp = connection_state. connection . borrow_mut ( ) ;
2629
2629
if let ( true , Ok ( c) ) = ( self . remote_ref_count > 0 , tmp. as_mut ( ) ) {
2630
- let mut message = c. new_outgoing_message ( 50 ) ; // XXX size hint
2630
+ let mut message = c. new_outgoing_message ( 10 ) ;
2631
2631
{
2632
2632
let root: message:: Builder = message. get_body ( ) . unwrap ( ) . init_as ( ) ;
2633
2633
let mut release = root. init_release ( ) ;
0 commit comments