Programming/node.js2019. 6. 28. 15:55

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

node.js xpath select() select1()  (0) 2019.07.25
node.js xpath apidoc  (0) 2019.07.25
node.js 메모리 사용 가능 용량 늘리기  (0) 2019.06.21
node.js fs.createreadstream highWaterMark  (0) 2019.06.19
node.js xml2js  (0) 2019.06.19
Posted by 구차니
Programming/node.js2019. 6. 21. 18:06

효과가 있는진 확인 못함..

(그 메모리 용량 가기 전에 느려지는 것으로 보여 xml-stream 모듈에 문제가 있는 걸로 보임)

 

[링크 : https://stackoverflow.com/questions/38558989/node-js-heap-out-of-memory]

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

node.js xpath apidoc  (0) 2019.07.25
node.js readline()  (0) 2019.06.28
node.js fs.createreadstream highWaterMark  (0) 2019.06.19
node.js xml2js  (0) 2019.06.19
node.js Javascript heap out of memory  (0) 2019.06.19
Posted by 구차니
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 구차니
Programming/node.js2019. 6. 18. 23:54

 

RangeError: File size is greater than possible Buffer: 0x7fffffff bytes
    at FSReqWrap.readFileAfterStat [as oncomplete] (fs.js:453:11)

[링크 : https://medium.com/dev-bits/writing-memory-efficient-software-applications-in-node-js-5575f646b67f]

 

[링크 : https://stackoverflow.com/questions/52314871/parsing-large-xml-files-1g-in-node-js]

[링크 : https://codeforgeek.com/parse-large-xml-files-node/]

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

node.js xml2js  (0) 2019.06.19
node.js Javascript heap out of memory  (0) 2019.06.19
electron ipc  (0) 2019.06.07
electron.js  (0) 2019.06.03
npm-run-all 병렬 빌드 (실패)  (0) 2019.05.29
Posted by 구차니
Programming/node.js2019. 6. 7. 15:34

node.js와 chromium 을 통합해 웹어플을 데스크탑 어플로 만들어 주는 녀석

크롬도 수정해서 require 쓸수 있게 하고

보안상의 문제로 별도의 express.js를 못쓰게 한다는데

아무튼 결국에는 node.js와 통신해서 웹과 무언가를 주고받는걸 찾아야 할듯

(근데 얘로 vscode를 만들었다는데 좀 쩌는 듯.. atom을 써봐야하나?)

 

[링크 : https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes]

[링크 : https://electronjs.org/docs/api/ipc-main]

[링크 : https://electronjs.org/docs/api/ipc-renderer]

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

node.js Javascript heap out of memory  (0) 2019.06.19
node.js 용량 제한(?)  (0) 2019.06.18
electron.js  (0) 2019.06.03
npm-run-all 병렬 빌드 (실패)  (0) 2019.05.29
pdf 내용 추출  (0) 2019.05.27
Posted by 구차니
Programming/node.js2019. 6. 3. 15:39

node.js + chromium으로

웹 앱을 데스크탑 앱으로 변경해주는 녀석으로 보이는 데..

 

어디서 걸핏 보이기에는 atom 에디터 개발하려고 쓴거라고 된거 같기도 하고.. 정체가 머냐?

Built on Electron
Initially developed for GitHub's Atom editor, Electron has since been adopted by companies all over the world.

 

[링크 : https://electronjs.org/]

 

+

[링크 : https://electronjs.org/docs/tutorial/native-file-drag-drop]

[링크 : https://ourcodeworld.com/.../how-to-execute-an-exe-file-system-application-using-electron-framework]

[링크 : https://www.npmjs.com/package/electron-window-manager]

 

 

+

2019.06.04

vscode 도 이걸로 만들어졌다니.. ㄷㄷ

[링크 : https://electronjs.org/apps/visual-studio-code]

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

node.js 용량 제한(?)  (0) 2019.06.18
electron ipc  (0) 2019.06.07
npm-run-all 병렬 빌드 (실패)  (0) 2019.05.29
pdf 내용 추출  (0) 2019.05.27
node.js express 301 redirect  (0) 2019.05.15
Posted by 구차니
Programming/node.js2019. 5. 29. 17:56

별다른 설정없이 해서 그런가

아니면 SSHD의 효과로 캐싱이 되서 그런가 속도 단축되지 않네..

 

$ time npm run build

real    0m54.356s
user    1m14.008s
sys     0m1.938s

 

$ time npm-run-all build

real    0m20.614s
user    0m26.791s
sys     0m0.973s

 

$ time npm run build

real    0m20.614s 
user    0m26.791s 
sys     0m0.973s 

 

[링크 : https://www.npmjs.com/package/npm-run-all]

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

electron ipc  (0) 2019.06.07
electron.js  (0) 2019.06.03
pdf 내용 추출  (0) 2019.05.27
node.js express 301 redirect  (0) 2019.05.15
node.js 항목 확인  (0) 2019.04.23
Posted by 구차니
Programming/node.js2019. 5. 27. 12:28

pdf 읽어오고 변환하는건 python이나 node.js 그리고 java 등에 모두 존재는 하는 듯

그래도 라이센스가 문제인데..

 

[링크 : https://pdfbox.apache.org/]

[링크 : https://www.tutorialkart.com/pdfbox/extract-text-line-by-line-from-pdf/]

 

[링크 : https://itextpdf.com/en]

[링크 : https://stackoverflow.com/questions/4028240/extract-columns-of-text-from-a-pdf-file-using-itext]

 

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

[링크 : https://www.npmjs.com/package/pdf-lib]

 

[링크 : http://www.unixuser.org/~euske/python/pdfminer/]

PDFMiner 모듈은 Python 2 버젼에서만 사용 가능

[링크 : https://dgkim5360.tistory.com/entry/python-pdfminer-convert-pdf-to-html-txt]

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

electron.js  (0) 2019.06.03
npm-run-all 병렬 빌드 (실패)  (0) 2019.05.29
node.js express 301 redirect  (0) 2019.05.15
node.js 항목 확인  (0) 2019.04.23
proxy error: Error: write after end  (0) 2019.04.23
Posted by 구차니