[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] For review: ANGLE_timer_query extension

On Fri, Apr 12, 2013 at 1:06 AM, Kenneth Russell <kbr@google.com> wrote:
Yes -- it means that badly written applications would still try to
spin loop waiting for getQueryParameter to return a valid value. This
must be specified to not work, and tested.
This simply cannot be a consideration. That's silly. You cannot possibly hope to prevent people from doing stupid things. This isn't the job of an API. You can make an API that doesn't force or invite you to do stupid things. But you cannot make an API that will preclude every stupid thing people might come up with. It's not possible. The sheer audacity of thinking that is so futile it baggers belief we're even talking about that.
The callback model can be converted into the polling model. The
callback would just store the result on the query object, or in some
sort of map. Then the tool can choose to display a subset of the
This isn't going to work, and you know it, and I know it. Querying thousands of timer objects, by default, without escape is already in its own right a massive cost. You can forget that. And though I don't have the insight to comment on how expensive callbacks are, I believe nobody so far contested Bens point that it takes a fair amount of time.

So sure, go and test it, and even if you find callbacks to be super-über-duper performant, it's still querying every single one of those timer queries for its value which is not acceptable.