Description
After calling getLatLngObj many times, node process size grows to the point where heap runs out of 2gb limit. I tried forcing gc() but that doesn't help. Perhaps a memory leak? Same thing on OSX and also on ubuntu.
I'm talking calling it a couple of million times (30 minutes, get it per second, over 1800 unique TLEs) and the process of using all the heap takes a few minutes.
Maybe ground track would avoid this? but I want to know position of all things at time T, not store position of all things at time T..T1, then take vertical slices of a large array.
Am not up to speed with heap memory use in node to diagnose further, sorry.
1: getSatelliteInfo(aka getSatelliteInfo) [0x1a08ab643c51] [/node_modules/tle.js/dist/tlejs.cjs:~1147] [pc=0x6183a988fca](this=0x1a08e6e804b1 <undefined>,0x1a0820cceb19 <String[#153]\: STARLINK-1673\n1 46327U 20062C 21296.50839213 -.00000375 00000-0 -63012-5 0 9997\n2 46327 53.0562 351.1412 0001137 89.3252 270.7867 15.06393643 63...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: 0x1011d1c65 node::Abort() (.cold.1) [/usr/local/bin/node]
2: 0x10009f919 node::Abort() [/usr/local/bin/node]
3: 0x10009fa7f node::OnFatalError(char const*, char const*) [/usr/local/bin/node]