소스 검색

The Magic operation now only checks the most commonly used Internet languages by default, to lower false positives and improve performance.

n1474335 7 년 전
부모
커밋
544d78f461
3개의 변경된 파일62개의 추가작업 그리고 7개의 파일을 삭제
  1. 2 1
      src/core/FlowControl.js
  2. 5 0
      src/core/config/OperationConfig.js
  3. 55 6
      src/core/lib/Magic.js

+ 2 - 1
src/core/FlowControl.js

@@ -267,10 +267,11 @@ const FlowControl = {
     runMagic: async function(state) {
         const ings = state.opList[state.progress].getIngValues(),
             depth = ings[0],
+            extLang = ings[1],
             dish = state.dish,
             currentRecipeConfig = state.opList.map(op => op.getConfig()),
             magic = new Magic(dish.get(Dish.ARRAY_BUFFER)),
-            options = await magic.speculativeExecution(depth);
+            options = await magic.speculativeExecution(depth, extLang);
 
         let output = `<table
                 class='table table-hover table-condensed table-bordered'

+ 5 - 0
src/core/config/OperationConfig.js

@@ -92,6 +92,11 @@ const OperationConfig = {
                 name: "Depth",
                 type: "number",
                 value: 3
+            },
+            {
+                name: "Extensive language support",
+                type: "boolean",
+                value: false
             }
         ]
     },

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 55 - 6
src/core/lib/Magic.js


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.