1 Reply Latest reply on May 21, 2014 3:26 PM by Christian Sadilek

    Errai Web Worker Linker

    Marius Gerwinn Newbie

      Hi errai team


      our app is growing fast thanks to your amazing framework!


      When getting bigger performance becomes more and more important.

      So we first speed up the startup process of our app with some basic server side rendering, lazy singletons and async loading of code fragments.

      Prefetching & prerendering of upcoming views also speeds up the user experience now.

      We furthermore fully decoupled the client side data layer from the ui and make heavy use of schedulers and batching to speed

      processing of data related tasks.

      Working with BindableProxies instead of the real data objects also improved the performance a bit.

      Finally we implemented some caching for the LocalStorage to make this faster.


      Anyhow our app still feals a bit slow in the startup process. Even on latest hardware.

      Some examples:

      • getting the data from local storage ready takes an average of 7 seconds now for each startup process
      • Processing the data fetched from infinite scrolling (about 40 entries including referenced onces) always

      produces a sluggish ui for 1-4 seconds.

      • filtering a complex query when having more than 200 local entries to filter also blocks the ui for 1-4 seconds
      • ...


      So whats the solution? Of course we can improve further especially on "micro level" and try to avoid or speed up the subroutines...

      But whats about using Web Workers instead and fully separate all client side data processing to some dedicated web worker?

      I found some linker code, probably from the speedtracer source, in the errai html5 project. Do you think it is possible to get

      this working? Besides the general problems of webworkers (browser support, asynchronous, etc) what problems do you expect?

      Do you have any comments implementing this? Do you maybe even have any experience implementing this or know somebody who already did


        • 1. Re: Errai Web Worker Linker
          Christian Sadilek Master

          Hi Marius,


          Yes, you should be able to use a dedicated Web Worker linker, if what you want is running a separate GWT module as a Web Worker. You can watch the IO 2010 presentation that introduced this linker:




          I don't have any personal experience with this but I would be interested in discussing how Errai can help leveraging Web Workers. If you have more ideas and/or feedback, please share it with us. Feel free to create a JIRA with a feature request if you're already thinking of something concrete. And, as always, contributions are more than welcome!