@@ -309,22 +309,17 @@ public void login()
309309 }
310310 }
311311
312- public IEntity run ( string script , ProgressListener listener = null , int priority = 4 , int parallelism = 2 , int fetchSize = 0 , bool clearMemory = false )
312+ public IEntity run ( string script , ProgressListener listener = null , int priority = 4 , int parallelism = 64 , int fetchSize = 0 , bool clearMemory = false )
313313 {
314- return run ( script , "script" , null , null , priority , parallelism , fetchSize , clearMemory ) ;
314+ return runInternal ( script , "script" , null , null , priority , parallelism , fetchSize , clearMemory ) ;
315315 }
316316
317- public IEntity run ( string function , IList < IEntity > arguments , int priority = 4 , int parallelism = 2 , int fetchSize = 0 , bool clearMemory = false )
317+ public IEntity run ( string function , IList < IEntity > arguments , int priority = 4 , int parallelism = 64 , int fetchSize = 0 , bool clearMemory = false )
318318 {
319- return run ( function , "function" , null , arguments , priority , parallelism , fetchSize , clearMemory ) ;
319+ return runInternal ( function , "function" , null , arguments , priority , parallelism , fetchSize , clearMemory ) ;
320320 }
321321
322- private IEntity run ( string script , string scriptType , IList < IEntity > arguments , int priority = 4 , int parallelism = 2 , int fetchSize = 0 , bool clearMemory = false )
323- {
324- return run ( script , scriptType , null , arguments , priority , parallelism , fetchSize , clearMemory ) ;
325- }
326-
327- private IEntity run ( string script , string scriptType , ProgressListener listener = null , IList < IEntity > arguments = null , int priority = 4 , int parallelism = 2 , int fetchSize = 0 , bool clearMemory = false )
322+ private IEntity runInternal ( string script , string scriptType , ProgressListener listener = null , IList < IEntity > arguments = null , int priority = 4 , int parallelism = 64 , int fetchSize = 0 , bool clearMemory = false )
328323 {
329324 try
330325 {
@@ -446,7 +441,7 @@ public void upload(IDictionary<string, IEntity> variableObjectMap)
446441 varNames . Append ( key + "," ) ;
447442 objects . Add ( variableObjectMap [ key ] ) ;
448443 }
449- run ( varNames . ToString ( ) , "variable" , objects ) ;
444+ runInternal ( varNames . ToString ( ) , "variable" , null , objects ) ;
450445 }
451446
452447 private bool isVariableCandidate ( string word )
@@ -724,7 +719,7 @@ public virtual IEntity tryRun(string script)
724719 }
725720 try
726721 {
727- return run ( script ) ;
722+ return runInternal ( script ) ;
728723 }
729724 catch
730725 {
@@ -733,13 +728,13 @@ public virtual IEntity tryRun(string script)
733728 }
734729
735730#if NETCOREAPP
736- public async Task < IEntity > runAsync ( string script , int priority = 4 , int parallelism = 2 , int fetchSize = 0 , bool clearMemory = false )
731+ public async Task < IEntity > runAsync ( string script , int priority = 4 , int parallelism = 64 , int fetchSize = 0 , bool clearMemory = false )
737732 {
738733 IEntity result = await Task . Run ( ( ) => run ( script , priority , parallelism , fetchSize , clearMemory ) ) ;
739734 return result ;
740735 }
741736
742- public async Task < IEntity > runAsync ( string function , IList < IEntity > arguments , int priority = 4 , int parallelism = 2 , int fetchSize = 0 , bool clearMemory = false )
737+ public async Task < IEntity > runAsync ( string function , IList < IEntity > arguments , int priority = 4 , int parallelism = 64 , int fetchSize = 0 , bool clearMemory = false )
743738 {
744739 IEntity result = await Task . Run ( ( ) => run ( function , arguments , priority , parallelism , fetchSize , clearMemory ) ) ;
745740 return result ;
@@ -748,22 +743,22 @@ public async Task<IEntity> runAsync(string function, IList<IEntity> arguments, i
748743
749744 public IEntity run ( string script )
750745 {
751- return run ( script , ( ProgressListener ) null ) ;
746+ return runInternal ( script , ( ProgressListener ) null ) ;
752747 }
753748
754749 public IEntity run ( string script , ProgressListener listener )
755750 {
756- return run ( script , listener , false ) ;
751+ return runInternal ( script , listener ) ;
757752 }
758753
759754 public IEntity run ( string script , bool clearSessionMemory )
760755 {
761- return run ( script , ( ProgressListener ) null , clearSessionMemory ) ;
756+ return runInternal ( script , ( ProgressListener ) null , 4 , 64 , 0 , clearSessionMemory ) ;
762757 }
763758
764759 public IEntity run ( string script , ProgressListener listener , bool clearSessionMemory )
765760 {
766- return run ( script , listener , 4 , 2 , 0 , clearSessionMemory ) ;
761+ return runInternal ( script , listener , 4 , 64 , 0 , clearSessionMemory ) ;
767762 }
768763
769764 public IEntity tryRun ( string function , IList < IEntity > arguments )
@@ -781,12 +776,16 @@ public IEntity tryRun(string function, IList<IEntity> arguments)
781776 }
782777 }
783778
784- public IEntity run ( string script , int priority = 4 , int parallelism = 2 , int fetchSize = 0 , bool clearMemory = false )
779+ public IEntity run ( string script , int priority = 4 , int parallelism = 64 , int fetchSize = 0 , bool clearMemory = false )
785780 {
786- return run ( script , ( ProgressListener ) null , priority , parallelism , fetchSize , clearMemory ) ;
781+ return runInternal ( script , ( ProgressListener ) null , priority , parallelism , fetchSize , clearMemory ) ;
782+ }
783+
784+ public IEntity run ( string script , ProgressListener listener = null , int priority = 4 , int parallelism = 64 , int fetchSize = 0 , bool clearMemory = false ) {
785+ return runInternal ( script , listener , priority , parallelism , fetchSize , clearMemory ) ;
787786 }
788787
789- public IEntity run ( string script , ProgressListener listener = null , int priority = 4 , int parallelism = 2 , int fetchSize = 0 , bool clearMemory = false )
788+ private IEntity runInternal ( string script , ProgressListener listener = null , int priority = 4 , int parallelism = 64 , int fetchSize = 0 , bool clearMemory = false )
790789 {
791790 lock ( threadLock_ )
792791 {
@@ -825,7 +824,13 @@ public IEntity run(string script, ProgressListener listener = null, int priority
825824 }
826825 }
827826 }
828- public IEntity run ( string function , IList < IEntity > arguments , int priority = 4 , int parallelism = 2 , int fetchSize = 0 , bool clearMemory = false )
827+
828+ public IEntity run ( string function , IList < IEntity > arguments , int priority = 4 , int parallelism = 64 , int fetchSize = 0 , bool clearMemory = false )
829+ {
830+ return runInternal ( function , arguments , priority , parallelism , fetchSize , clearMemory ) ;
831+ }
832+
833+ private IEntity runInternal ( string function , IList < IEntity > arguments , int priority = 4 , int parallelism = 64 , int fetchSize = 0 , bool clearMemory = false )
829834 {
830835 lock ( threadLock_ )
831836 {
@@ -867,7 +872,7 @@ public IEntity run(string function, IList<IEntity> arguments, int priority = 4,
867872
868873 public IEntity run ( string script , ProgressListener listener , int priority , int parallelism , int fetchSize )
869874 {
870- return run ( script , listener , priority , parallelism , fetchSize , false ) ;
875+ return runInternal ( script , listener , priority , parallelism , fetchSize , false ) ;
871876 }
872877
873878 public void tryUpload ( IDictionary < string , IEntity > variableObjectMap )
@@ -914,26 +919,26 @@ public void upload(IDictionary<string, IEntity> variableObjectMap)
914919 }
915920 }
916921
917- public List < IEntity > run ( IList < string > sqlList , int priority = 4 , int parallelism = 2 , bool clearMemory = false )
922+ public List < IEntity > run ( IList < string > sqlList , int priority = 4 , int parallelism = 64 , bool clearMemory = false )
918923 {
919924 List < IEntity > results = new List < IEntity > ( ) ;
920925 foreach ( string sql in sqlList )
921926 {
922- IEntity entity = run ( sql , priority , parallelism , 0 , clearMemory ) ;
927+ IEntity entity = runInternal ( sql , ( ProgressListener ) null , priority , parallelism , 0 , clearMemory ) ;
923928 results . Add ( entity ) ;
924929 }
925930 return results ;
926931 }
927932
928933#if NETCOREAPP
929- public async Task < List < IEntity > > runAsync ( IList < string > sqlList , int priority = 4 , int parallelism = 2 , bool clearMemory = false )
934+ public async Task < List < IEntity > > runAsync ( IList < string > sqlList , int priority = 4 , int parallelism = 64 , bool clearMemory = false )
930935 {
931936 List < IEntity > result = await Task . Run ( ( ) => run ( sqlList , priority , parallelism , clearMemory ) ) ;
932937 return result ;
933938 }
934939#endif
935940
936- public List < IEntity > run ( IList < string > sqlList , IList < IList < IEntity > > argumentsList , int priority = 4 , int parallelism = 2 , bool clearMemory = false )
941+ public List < IEntity > run ( IList < string > sqlList , IList < IList < IEntity > > argumentsList , int priority = 4 , int parallelism = 64 , bool clearMemory = false )
937942 {
938943 if ( sqlList . Count != argumentsList . Count )
939944 {
@@ -942,14 +947,14 @@ public List<IEntity> run(IList<string> sqlList, IList<IList<IEntity>> argumentsL
942947 List < IEntity > results = new List < IEntity > ( ) ;
943948 for ( int i = 0 ; i < sqlList . Count ; i ++ )
944949 {
945- IEntity entity = run ( sqlList [ i ] , argumentsList [ i ] , priority , parallelism , 0 , clearMemory ) ;
950+ IEntity entity = runInternal ( sqlList [ i ] , argumentsList [ i ] , priority , parallelism , 0 , clearMemory ) ;
946951 results . Add ( entity ) ;
947952 }
948953 return results ;
949954 }
950955
951956#if NETCOREAPP
952- public async Task < List < IEntity > > runAsync ( IList < string > sqlList , IList < IList < IEntity > > argumentsList , int priority = 4 , int parallelism = 2 , bool clearMemory = false )
957+ public async Task < List < IEntity > > runAsync ( IList < string > sqlList , IList < IList < IEntity > > argumentsList , int priority = 4 , int parallelism = 64 , bool clearMemory = false )
953958 {
954959 List < IEntity > result = await Task . Run ( ( ) => run ( sqlList , argumentsList , priority , parallelism , clearMemory ) ) ;
955960 return result ;
0 commit comments