- From: John Tamplin <jat@google.com>
- Date: Wed, 9 Feb 2011 02:19:01 -0500
On Tue, Feb 8, 2011 at 11:26 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote: > You don't need to be more efficient to avoid freezing the UI. You just > have to not do the parsing work in a single shot on the main thread. You can > either break it up (cooperative multitasking, effectively), or put it on a > separate thread (preemptive multitasking). None of that is limited by the > hardware of the device, really. > Well, there is only a certain amount of processing power to go around. No matter how well it is implemented, time spent parsing is time that can't be spent doing other things if the app is pushing the client to the limit, and it makes sense to let the app provide hints of when is a good time to spend that effort and when isn't a good time. And that is completely separate from the fact that today's implementations aren't perfect and do have significant user-perceived slowdowns from parsing. So in the world that exists today, those hints are even more useful -- in fact without them, you wind up with crude hacks that *do* prevent smarter browsers from doing things ahead of time like the comment hack. I am not sure I understand why you are so opposed to providing a mechanism for an application to tell the browser it would like the parsing to not necessarily be performed immediately on a downloaded script. -- John A. Tamplin Software Engineer (GWT), Google
Received on Tuesday, 8 February 2011 23:19:01 UTC