On 3/12/16 10:22 PM, Brian Barnes wrote:
We’re closing in on something!  This could have been clearer on my end;
I am looking at only javascript objects.  My code, for instance,
interacts only though a webgl context; it never creates any nodes or
does anything outside of javascript.

But it creates WebGL objects like WebGLUniformLocation or WebGLTexture? Because those aren't mark-and-sweep either... They're much more like DOM nodes in terms of their memory management.

But again, the definition of "GC" as described on the page you link to
doesn't cover everything that's touched by "GC" as it matters for an
actual page in a web browser…

Yeah, again, I think this is where we are bumping heads over.  I never
meant it to matter at all to what goes on in the browser, just objects
created in code.

I think we might have different definitions of "objects created in code". Are you including return values from getUniformLocation?

This, basically:

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_GC

Having System.gc() call that would solve my problem (I think.)

What I'm trying to say is that it may well not, if it just called JS_GC and if the problem to be solved is pauses on the order of several tens to hundreds of milliseconds due to memory collection activity...

Honestly, I never thought I’d get into this discussion.  I always saw
this as something that would be different, from engine to engine, as
engine GCs are different.  The end user doesn’t have a lot of control or
knowledge of the mechanics of such things.

OK.  We agree so far.  ;)

System.gc() would be the same thing.

OK, but then we run the very real risk of it not actually doing what people want. Or more precisely browsers implementing it in various different ways as they attempt to map its not-really-defined semantics onto their actual GC systems and then people sprinkling it about based on the GC heuristics and setup in one particular browser they tested with and optimized for, and then other browsers having to reverse engineer those _and_ that one browser being locked into never changing how its GC operates.

And then we all lose.  :(

-Boris
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to