Explorar el Código

优化日志获取

hl hace 7 meses
padre
commit
3e88285135
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/utils/file.js

+ 1 - 1
src/utils/file.js

@@ -171,7 +171,7 @@ async function readLastNLines(dirPath, filePathList, n) {
 async function readLinesFromEnd(filePath, maxLines) {
     const lines = [];
     const fileSize = fs.statSync(filePath).size;
-    const chunkSize = 1024; // 每次读取的块大小
+    const chunkSize = 1024*10*5; // 每次读取的块大小