OoliteProject / oolite

The main Oolite repository.
https://www.oolite.space
553 stars 70 forks source link

Add return value for writeJSMemoryStats #298

Open cag62 opened 6 years ago

cag62 commented 6 years ago

Can you change writeJSMemoryStats() (file: OOJSConsole.m) to return the heap size it receives (but ignores) from dumpJSMemoryStatistics() (file: OODebugMonitor.m) OR add a fn similar to writeJSMemoryStats that doesn't write, just returns the heap size? Having the actual number would take the guess work out of tracking garbage generation.

AnotherCommander commented 6 years ago

Before putting any work on this, can you please describe how you would want to use such a feature? Why is outputting the heap size in the log, as already is the case, not enough?

cag62 commented 6 years ago

Why is outputting the heap size in the log, as already is the case, not enough?

... how you would want to use such a feature?

There will always be some garbage generated, it's the nature of these types of languages. But by reducing the more egregious ones, we can greatly reduce the frequency of in-flight stutters produced by GC. I hope to be able to post some simple examples for our non-technical authors to avoid common pitfalls. Having a metric, like the profiler, can tell me which are worth the effort vs those that are just a waste of time.

On Mon, May 28, 2018 at 9:05 AM, AnotherCommander notifications@github.com wrote:

Before putting any work on this, can you please describe how you would want to use such a feature? Why is outputting the heap size in the log, as already is the case, not enough?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OoliteProject/oolite/issues/298#issuecomment-392521909, or mute the thread https://github.com/notifications/unsubscribe-auth/AeIyep3CsdeRE3q1XLtFA-3nfa1KBKBaks5t2_YDgaJpZM4UPFlC .