File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export class StreamingAPI extends BaseYdbAPI {
8585 if ( done ) {
8686 break ;
8787 }
88- streamParser . processChunk ( value ) ;
88+ streamParser . processBuffer ( value ) ;
8989 }
9090 } finally {
9191 reader . releaseLock ( ) ;
Original file line number Diff line number Diff line change @@ -84,17 +84,13 @@ export class MultipartStreamParser {
8484 this . bufferPos = 0 ;
8585 }
8686
87- processChunk ( chunk : Uint8Array ) : void {
87+ processBuffer ( chunk : Uint8Array ) : void {
8888 // Append new data to buffer
8989 const newBuffer = new Uint8Array ( this . buffer . length + chunk . length ) ;
9090 newBuffer . set ( this . buffer ) ;
9191 newBuffer . set ( chunk , this . buffer . length ) ;
9292 this . buffer = newBuffer ;
9393
94- this . processBuffer ( ) ;
95- }
96-
97- private processBuffer ( ) : void {
9894 while ( this . bufferPos < this . buffer . length ) {
9995 const boundaryPos = arrayIndexOf ( this . buffer , this . boundaryBytes , this . bufferPos ) ;
10096 if ( boundaryPos === - 1 ) {
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ interface QueryStats {
259259 endTime ?: string | number ;
260260}
261261
262- const DEFAULT_STREAM_CHUNK_SIZE = 100 ;
262+ const DEFAULT_STREAM_CHUNK_SIZE = 2 ;
263263const DEFAULT_CONCURRENT_RESULTS = false ;
264264
265265export const queryApi = api . injectEndpoints ( {
You can’t perform that action at this time.
0 commit comments