Status: New
Owner: ----

New issue 3950 by coola...@gmail.com: compile javascript asynchronously
https://code.google.com/p/v8/issues/detail?id=3950

Architecture: ARM

THE PROBLEM
------------------

I have so much JavaScript in my application that it is too much to load in a single minified file without adversely affecting user experience, so I take a hybrid pre-fetch / lazy-load approach (multiple large-ish bundled modules).

The problem is that the lazy-loaded modules are large and or complex enough that they cause the main thread to block for whole seconds (700 MHz single core ARM processor).

Because of the dependency chain, it isn't feasible to lazy load everything.

My use case is actually node (see https://github.com/iojs/io.js/issues/1083), but the problem applies to UI blocking and network blocking the same.

In the case of the browser this would prevent scrolling, clicks, etc. In the case of node it prevents what would be small, fast, network replies.

Bad. News. Bears. y'know?

DESIRED SOLUTION
------------

I'd like to be able to fetch the text of the script and then have it compiled in the background so that the main thread isn't blocked.

The node guys tell me that they don't know of a hook in v8 to asynchronously compile the text without blocking the main thread. See https://github.com/iojs/io.js/issues/1083

However, I see on the chromium blog that last month you started implementing features to address problems similar to this, so it sounds like it's the type of issue you'd like to know about and provide a solution for. See http://blog.chromium.org/2014/02/compiling-in-background-for-smoother.html

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to