7070 . c ( d ! ( ) )
7171 . and_then ( |mut env| {
7272 env. push_nodes (
73- alt ! ( * fullnode, NodeKind :: FullNode , NodeKind :: ArchiveNode , ) ,
73+ alt ! ( * fullnode, NodeKind :: FullNode , NodeKind :: ArchiveNode ) ,
7474 Some ( custom_data. clone ( ) ) ,
7575 host. as_ref ( ) ,
7676 * num,
@@ -325,7 +325,7 @@ where
325325 /// Non-fuhrer node collection
326326 pub nodes : BTreeMap < NodeID , N > ,
327327
328- /// An in-memory cache for recording node status,
328+ /// An cache for recording node status,
329329 pub nodes_should_be_online : MapxOrd < NodeID , ( ) > ,
330330
331331 /// Data data may be useful when cfg/running nodes,
@@ -955,8 +955,9 @@ where
955955 let mut online_ids = vec ! [ ] ;
956956 let mut errlist = vec ! [ ] ;
957957
958- // Use chunks to avoid resource overload
959- for ( idx, nodes) in nodes. chunks ( 12 ) . enumerate ( ) {
958+ // Use chunks to avoid resource overload,
959+ // set a smaller chunk size here!
960+ for ( idx, nodes) in nodes. chunks ( 6 ) . enumerate ( ) {
960961 thread:: scope ( |s| {
961962 nodes
962963 . iter ( )
@@ -983,9 +984,10 @@ where
983984 }
984985 } ) ;
985986 } ) ;
986- }
987987
988- self . update_online_status ( & online_ids, & [ ] ) ;
988+ // Update with each chunk
989+ self . update_online_status ( & online_ids, & [ ] ) ;
990+ }
989991
990992 if !ignore_failed {
991993 check_errlist ! ( @errlist)
0 commit comments