W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

[Bug 19761] Dictionary type for MIDIMessage is likely a performance issue

From: <bugzilla@jessica.w3.org>
Date: Thu, 01 Nov 2012 09:37:41 +0000
To: public-audio@w3.org
Message-ID: <bug-19761-5429-EBMNkT1uWx@http.www.w3.org/Bugs/Public/>

--- Comment #3 from Jussi Kalliokoski <jussi.kalliokoski@gmail.com> ---
(In reply to comment #2)
> (In reply to comment #1)
> > I'm not sure what you mean by a type that can be explicitly typecast, could
> > you clarify? Do you mean using a constructed type instead, like `new
> > MIDIMessage(data, timestamp)`?
> In essence, except the other way around.  A Dictionary type just means an
> Object with those members; unfortunately, they can be organized in any way,
> and the members need to be "searched" for; these types cannot be optimized
> down to essentially a struct behind the scenes.  I received feedback that it
> is best to avoid Dictionary types for basic structures unless absolutely
> necessary.

True. Since we've already simplified the MIDIMessage interface to just contain
the data and the timestamp, we might take it a step further, i.e. change the
`send(MIDIMessage)` signature to be `send(Uint8Array data, DOMHighResTimeStamp?
timestamp)`, and change the MIDIMessage from a dictionary to an interface
(since dictionary makes no sense if it's not ever created by the user).


You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 1 November 2012 09:37:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:14 UTC