MLstate / opalang

The Opa Language for Web Application Development
http://opalang.org
Other
1.24k stars 125 forks source link

Extensive Client - Server Communication #175

Open izderadicka opened 9 years ago

izderadicka commented 9 years ago

I'm playing with latest Opa - version 1.2.0 -- build 4463 and I was surprised by very heavy communication between client and server - I monitored requests in Chrome and Firefox dev tools.

Example - using sample birdy app ( but same behaviour I experienced in my test application):

Registration form:

Is this behaviour normal? I specially checked this in reference app, to be sure it's not issue in my code. How such approach can scale?

hbbio commented 9 years ago

Indeed, it should not be like that.

This is due to a regression probably introduced by changes to the i18n system in the last months. We have planned many changes here, but are lacking time to fix them now. Namely, we will switch the i18n runtime to FormatJS.

In the meantime, you can reduce the number of requests by adding slicing annotations (client, server) to your code.