W3C home > Mailing lists > Public > public-html@w3.org > September 2013

Re: TextTrackCue discussions

From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
Date: Fri, 20 Sep 2013 16:53:52 +1000
Message-ID: <CAHp8n2m7J06jVX3-Sxwrovuj16wT2SAtHDn50_CRG5cix-Ze0g@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-html <public-html@w3.org>
On 20 Sep 2013 13:36, "Boris Zbarsky" <bzbarsky@mit.edu> wrote:
> On 9/19/13 11:21 PM, Silvia Pfeiffer wrote:
>> Should we keep .text as well, because converting from ArrayBuffer to
>> String can be inefficient, see
>> ?
> Can we quantify "inefficient"?
> The link you have there shows that the direct array manipulation approach
on the system that was tested can convert a 1015-char string to an
ArrayBuffer and back about 30k times per second in a modern browser.  Are
we expecting people to be pushing ~30MB of cue data per second through
conversions to strings?

Hopefully not, though you never know. But it's also about convenience.
.text would be created lazily by the browser, so if the JS dev never needs
it, there is no penalty. If they need it, the browser is always faster and
it's more convenient for the dev. Finally, if the browser knows it's text,
there is no conversion required and direct exposure is more efficient (I.e.
makes your web page faster and frees up cycles for other stuff).

Received on Friday, 20 September 2013 06:54:20 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:46:05 UTC