node.js - node-webkit Helper memory management -
i coding lightweight single page app node-webkit
app. i've been doing memory profiling in order observe memory leaks , maintain app usable on older systems. found out code pretty memory efficient, node-webkit helper
process runs keeps eating more , more ram time goes by. provide simple "restart" function reload page; thought clear of objects in memory, found out node-webkit helper's memory usage increases 10 mb @ each reload! in this issue thread on node-webkit's issues page found out magical line of code
require('nw-gui').window.get().reload(3)
which seems reload page while cleaning memory (i end around 50 mb node-webkit plus ~15 mb required app), kinda hacky (also, can executed 1 time on same page apparently, have chain location.reload()
implement "clear , restart" functionality). have clue how maintain node-webkit's helper memory usage @ bay and/or provide kind of "restart" function in less hacky way? explanations of how memory management works in node-webkit's context appreciated, topics seems quite complex , there aren't many understandable sources on it.
node.js memory chromium node-webkit
No comments:
Post a Comment