Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #31383

Parsing javascript file off the main thread

Newsgroups comp.lang.javascript
Date 2016-09-16 06:29 -0700
Message-ID <fa9f1a4a-1f09-4ff0-9f23-d249dea58a52@googlegroups.com> (permalink)
Subject Parsing javascript file off the main thread
From georgkothmeier@gmail.com

Show all headers | View raw


Hey!

I wonder if it is possible to parse a javascript file off the main thread. If it is possible, is it possible across all modern browsers?

Our use-case is a 25mb (6 mb gzipped) Unity-asm.js-export of a game. If the Unity-asm.js-source is parsed the whole browser freezes. Which is not a nice UX. The loading and parsing wouldn't be a problem because we do it in background but the freezing of the whole UI is a big problem.

I know Unity is not really "web-ready" but we have to deal with it because we have a quite huge code base written in Unity. As a technical detail, Unity loads the 25mb JavaScript via a blob: URL. Don't know if this makes a difference for my question.

Are there any ways around? Would it also be possible to cache the byte code of the parsed script somehow?

Thanks a lot for your ideas

Back to comp.lang.javascript | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Parsing javascript file off the main thread georgkothmeier@gmail.com - 2016-09-16 06:29 -0700
  Re: Parsing javascript file off the main thread "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-16 17:43 +0200
    Re: Parsing javascript file off the main thread Georg Kothmeier <georgkothmeier@gmail.com> - 2016-09-16 16:16 -0700
    Re: Parsing javascript file off the main thread Georg Kothmeier <georgkothmeier@gmail.com> - 2016-09-16 16:18 -0700
      Re: Parsing javascript file off the main thread "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-17 10:47 +0200
  Re: Parsing javascript file off the main thread "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-18 10:55 -0700
    Re: Parsing javascript file off the main thread Georg Kothmeier <georgkothmeier@gmail.com> - 2016-09-19 00:28 -0700
      Re: Parsing javascript file off the main thread "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-19 08:15 -0700
        Re: Parsing javascript file off the main thread Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-19 19:46 +0200
          Re: Parsing javascript file off the main thread "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-19 11:00 -0700
            Re: Parsing javascript file off the main thread Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-19 20:42 +0200
              Re: Parsing javascript file off the main thread "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-19 11:53 -0700
                Re: Parsing javascript file off the main thread Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-20 00:01 +0200
                Re: Parsing javascript file off the main thread "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-20 12:02 -0700
                Re: Parsing javascript file off the main thread Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-20 21:26 +0200
                Re: Parsing javascript file off the main thread "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-20 17:38 -0700
                Re: Parsing javascript file off the main thread Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-22 06:46 +0200
                Re: Parsing javascript file off the main thread "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-22 05:53 -0700
                Re: Parsing javascript file off the main thread Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-23 02:42 +0200
                Re: Parsing javascript file off the main thread "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-23 09:29 -0700
                Re: Parsing javascript file off the main thread "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-20 12:00 -0700
                Re: Parsing javascript file off the main thread Scott Sauyet <scott@sauyet.com> - 2016-09-21 02:24 +0000

csiph-web