@@ -309,22 +309,17 @@ public void login()
309
309
}
310
310
}
311
311
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 )
313
313
{
314
- return run ( script , "script" , null , null , priority , parallelism , fetchSize , clearMemory ) ;
314
+ return runInternal ( script , "script" , null , null , priority , parallelism , fetchSize , clearMemory ) ;
315
315
}
316
316
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 )
318
318
{
319
- return run ( function , "function" , null , arguments , priority , parallelism , fetchSize , clearMemory ) ;
319
+ return runInternal ( function , "function" , null , arguments , priority , parallelism , fetchSize , clearMemory ) ;
320
320
}
321
321
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 )
328
323
{
329
324
try
330
325
{
@@ -446,7 +441,7 @@ public void upload(IDictionary<string, IEntity> variableObjectMap)
446
441
varNames . Append ( key + "," ) ;
447
442
objects . Add ( variableObjectMap [ key ] ) ;
448
443
}
449
- run ( varNames . ToString ( ) , "variable" , objects ) ;
444
+ runInternal ( varNames . ToString ( ) , "variable" , null , objects ) ;
450
445
}
451
446
452
447
private bool isVariableCandidate ( string word )
@@ -724,7 +719,7 @@ public virtual IEntity tryRun(string script)
724
719
}
725
720
try
726
721
{
727
- return run ( script ) ;
722
+ return runInternal ( script ) ;
728
723
}
729
724
catch
730
725
{
@@ -733,13 +728,13 @@ public virtual IEntity tryRun(string script)
733
728
}
734
729
735
730
#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 )
737
732
{
738
733
IEntity result = await Task . Run ( ( ) => run ( script , priority , parallelism , fetchSize , clearMemory ) ) ;
739
734
return result ;
740
735
}
741
736
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 )
743
738
{
744
739
IEntity result = await Task . Run ( ( ) => run ( function , arguments , priority , parallelism , fetchSize , clearMemory ) ) ;
745
740
return result ;
@@ -748,22 +743,22 @@ public async Task<IEntity> runAsync(string function, IList<IEntity> arguments, i
748
743
749
744
public IEntity run ( string script )
750
745
{
751
- return run ( script , ( ProgressListener ) null ) ;
746
+ return runInternal ( script , ( ProgressListener ) null ) ;
752
747
}
753
748
754
749
public IEntity run ( string script , ProgressListener listener )
755
750
{
756
- return run ( script , listener , false ) ;
751
+ return runInternal ( script , listener ) ;
757
752
}
758
753
759
754
public IEntity run ( string script , bool clearSessionMemory )
760
755
{
761
- return run ( script , ( ProgressListener ) null , clearSessionMemory ) ;
756
+ return runInternal ( script , ( ProgressListener ) null , 4 , 64 , 0 , clearSessionMemory ) ;
762
757
}
763
758
764
759
public IEntity run ( string script , ProgressListener listener , bool clearSessionMemory )
765
760
{
766
- return run ( script , listener , 4 , 2 , 0 , clearSessionMemory ) ;
761
+ return runInternal ( script , listener , 4 , 64 , 0 , clearSessionMemory ) ;
767
762
}
768
763
769
764
public IEntity tryRun ( string function , IList < IEntity > arguments )
@@ -781,12 +776,16 @@ public IEntity tryRun(string function, IList<IEntity> arguments)
781
776
}
782
777
}
783
778
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 )
785
780
{
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 ) ;
787
786
}
788
787
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 )
790
789
{
791
790
lock ( threadLock_ )
792
791
{
@@ -825,7 +824,13 @@ public IEntity run(string script, ProgressListener listener = null, int priority
825
824
}
826
825
}
827
826
}
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 )
829
834
{
830
835
lock ( threadLock_ )
831
836
{
@@ -867,7 +872,7 @@ public IEntity run(string function, IList<IEntity> arguments, int priority = 4,
867
872
868
873
public IEntity run ( string script , ProgressListener listener , int priority , int parallelism , int fetchSize )
869
874
{
870
- return run ( script , listener , priority , parallelism , fetchSize , false ) ;
875
+ return runInternal ( script , listener , priority , parallelism , fetchSize , false ) ;
871
876
}
872
877
873
878
public void tryUpload ( IDictionary < string , IEntity > variableObjectMap )
@@ -914,26 +919,26 @@ public void upload(IDictionary<string, IEntity> variableObjectMap)
914
919
}
915
920
}
916
921
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 )
918
923
{
919
924
List < IEntity > results = new List < IEntity > ( ) ;
920
925
foreach ( string sql in sqlList )
921
926
{
922
- IEntity entity = run ( sql , priority , parallelism , 0 , clearMemory ) ;
927
+ IEntity entity = runInternal ( sql , ( ProgressListener ) null , priority , parallelism , 0 , clearMemory ) ;
923
928
results . Add ( entity ) ;
924
929
}
925
930
return results ;
926
931
}
927
932
928
933
#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 )
930
935
{
931
936
List < IEntity > result = await Task . Run ( ( ) => run ( sqlList , priority , parallelism , clearMemory ) ) ;
932
937
return result ;
933
938
}
934
939
#endif
935
940
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 )
937
942
{
938
943
if ( sqlList . Count != argumentsList . Count )
939
944
{
@@ -942,14 +947,14 @@ public List<IEntity> run(IList<string> sqlList, IList<IList<IEntity>> argumentsL
942
947
List < IEntity > results = new List < IEntity > ( ) ;
943
948
for ( int i = 0 ; i < sqlList . Count ; i ++ )
944
949
{
945
- IEntity entity = run ( sqlList [ i ] , argumentsList [ i ] , priority , parallelism , 0 , clearMemory ) ;
950
+ IEntity entity = runInternal ( sqlList [ i ] , argumentsList [ i ] , priority , parallelism , 0 , clearMemory ) ;
946
951
results . Add ( entity ) ;
947
952
}
948
953
return results ;
949
954
}
950
955
951
956
#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 )
953
958
{
954
959
List < IEntity > result = await Task . Run ( ( ) => run ( sqlList , argumentsList , priority , parallelism , clearMemory ) ) ;
955
960
return result ;
0 commit comments