Please help with writing spec for async JSON APIs
allen at wirfs-brock.com
Mon Aug 3 15:56:14 UTC 2015
On Aug 3, 2015, at 8:45 AM, Boris Zbarsky wrote:
> On 8/3/15 11:34 AM, Allen Wirfs-Brock wrote:
>> 4) JSON.parse/stringify are pure computational operations. There is no
>> perf benefit to making them asynchronous unless some of their
>> computation can be performed concurrently.
> Or even just incrementally, right?
> In practice, 500 chunks of 5ms of processing may be better for a GUI application that wants to remain responsive than a single chunk of 2500ms, even if it doesn't happen concurrently, as long as it yields to processing of user events.
sure, but that's a user interactiveness benefit, not a "perf benefit". There is almost always some overhead introduced when making a computation incremental. Responsiveness is a fine reason to make such a trade-off.
More information about the es-discuss