Re:The Linux kernel's inability to gracefully handle low mem...
by gnode on Tuesday August 06, 2019 @07:17AM
(#20624126)
Rather than guess at what to avoid, you should make use of the memory profilers which Firefox and Chromium developer tools provide. Apparently Firefox's memory profiler is an add-on: https://developer.mozilla.org/en-US/docs/Mozilla/Performance...
[ Parent
| on HN ]
Re:The Linux kernel's inability to gracefully handle low mem...
by heavenlyblue on Tuesday August 06, 2019 @08:24AM
(#20624473)
Yeah, but this is a pigeonholing principle.
I don’t want to spend my time developing something only to discover it doesn’t perform well due to some reason.
I would prefer to not use any of the performance killers in the first place.
Re:The Linux kernel's inability to gracefully handle low mem...
by gnode on Tuesday August 06, 2019 @11:48AM
(#20626240)
Firstly, avoid leaking memory (including objects like images and DOM nodes) in JavaScript. Leaking memory here means retaining a reference beyond the end of the object's use. The garbage collector only collects memory which is no longer referenced; it does not attempt to analyse when a reference is no longer used.
Secondly, avoid including unnecessary resources. Many web pages include many libraries which are then mostly unused. Some packaging tools can help eliminate such unused code.
A memory profiler helps in both cases: it detects leaks, and it measures the cost of resources, allowing you to make educated decisions about their inclusion.