'2019/06/19'에 해당되는 글 4건

  1. 2019.06.19 node.js fs.createreadstream highWaterMark
  2. 2019.06.19 node.js xml2js
  3. 2019.06.19 node.js Javascript heap out of memory
  4. 2019.06.19 리눅스 캐시 비우기
Programming/node.js2019. 6. 19. 04:16

스트림으로 읽어오는 놈을 찾다 보니 이런게 있는데..

희한하게(?) 너무 뜨문뜨문 읽어서 확인해보니

한번에 읽어오는 용량을 설정할수 있고 기본 값은 64kb 라고.. (kB가 아니라?)

 

Unlike the 16 kb default highWaterMark for a readable stream, the stream returned by this method has a default highWaterMark of 64 kb. 

options can include start and end values to read a range of bytes from the file instead of the entire file. Both start and end are inclusive and start counting at 0, allowed values are in the [0, Number.MAX_SAFE_INTEGER] range. If fd is specified and start is omitted or undefined, fs.createReadStream() reads sequentially from the current file position. The encoding can be any one of those accepted by Buffer.

[링크 : https://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options]

[링크 : https://stackoverflow.com/questions/24005496/nodejs-copying-file-over-a-stream-is-very-slow]

[링크 : https://stackoverflow.com/questions/48065065/createreadstream-not-working-extremely-slow-for-large-files]

'Programming > node.js' 카테고리의 다른 글

node.js readline()  (0) 2019.06.28
node.js 메모리 사용 가능 용량 늘리기  (0) 2019.06.21
node.js xml2js  (0) 2019.06.19
node.js Javascript heap out of memory  (0) 2019.06.19
node.js 용량 제한(?)  (0) 2019.06.18
Posted by 구차니
Programming/node.js2019. 6. 19. 03:45

스트림이 아니라 XML 파일이 1기가 넘어가면 한번에 못 읽음

[링크 : https://www.npmjs.com/package/xml2js]

 

스트림 파서라 용량 제한없이 읽을수 있음

[링크 : https://www.npmjs.com/package/xml-stream]

 

xml2js 보다 엄청 빠르다는데 안써봄

[링크 : https://www.npmjs.com/package/fast-xml-parser]

 

'Programming > node.js' 카테고리의 다른 글

node.js 메모리 사용 가능 용량 늘리기  (0) 2019.06.21
node.js fs.createreadstream highWaterMark  (0) 2019.06.19
node.js Javascript heap out of memory  (0) 2019.06.19
node.js 용량 제한(?)  (0) 2019.06.18
electron ipc  (0) 2019.06.07
Posted by 구차니
Programming/node.js2019. 6. 19. 03:07

참으로 다양하게 죽여보는구만.. -_-a

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [node]
 2: 0x5605160f2011 [node]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
 5: v8::internal::Factory::NewCode(v8::internal::CodeDesc const&, unsigned int, v8::internal::Handle, bool, int) [node]
 6: v8::internal::CodeGenerator::MakeCodeEpilogue(v8::internal::TurboAssembler*, v8::internal::EhFrameWriter*, v8::internal::CompilationInfo*, v8::internal::Handle) [node]
 7: v8::internal::compiler::CodeGenerator::FinalizeCode() [node]
 8: v8::internal::compiler::PipelineImpl::FinalizeCode() [node]
 9: v8::internal::compiler::PipelineCompilationJob::FinalizeJobImpl() [node]
10: v8::internal::CompilationJob::FinalizeJob() [node]
11: v8::internal::Compiler::FinalizeCompilationJob(v8::internal::CompilationJob*) [node]
12: v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions() [node]
13: v8::internal::StackGuard::HandleInterrupts() [node]
14: v8::internal::Runtime_StackGuard(int, v8::internal::Object**, v8::internal::Isolate*) [node]
15: 0x2557162840bd

 

[링크 : https://bloodguy.tistory.com/entry/nodejs-FATAL-ERROR-CALLANDRETRYLAST-Allocation-failed-process-out-of-memory-에러-원인-해결방법]

팔자에 없는 GC 공부하는 중.. 끄응..

'Programming > node.js' 카테고리의 다른 글

node.js fs.createreadstream highWaterMark  (0) 2019.06.19
node.js xml2js  (0) 2019.06.19
node.js 용량 제한(?)  (0) 2019.06.18
electron ipc  (0) 2019.06.07
electron.js  (0) 2019.06.03
Posted by 구차니
Linux2019. 6. 19. 01:13

htop에서 노란색이 훅 줄어드네?

 

# echo 3 > /proc/sys/vm/drop_caches

[링크 : https://zetawiki.com/wiki/리눅스_캐시_메모리_비우기]

[링크 : https://serverfault.com/questions/180711/what-exactly-do-the-colors-in-htop-status-bars-mean]

'Linux' 카테고리의 다른 글

bash argument list is too long  (0) 2019.06.25
sgrep  (0) 2019.06.24
gzip -k  (0) 2019.06.18
diff: memory exhausted  (0) 2019.06.18
plymouth  (0) 2019.06.14
Posted by 구차니