You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Next step to reduce the speed and browser memory usage when loading the website
Description
Once all JS-related translations have been re-arranged (openfoodfoundation/wishlist#342), we can do this to reduce initial page size by approx ~170kb (approx ~50kb compressed over the wire, estimated in Nov 2022). It results in far less JSON for the browser to load into memory and parse.
This is estimated per language enabled on the instance, so this advantage multiplies for multi-language instances.
The browser should only have to download translations that will be used by the JS. After openfoodfoundation/wishlist#342 is done, these will be those under the "js." namespace.
Actual Behavior
All translations for each available language, even those accessed only by Ruby code, are downloaded by the browser.
Next step to reduce the speed and browser memory usage when loading the website
Description
Once all JS-related translations have been re-arranged (openfoodfoundation/wishlist#342), we can do this to reduce initial page size by approx ~170kb (approx ~50kb compressed over the wire, estimated in Nov 2022). It results in far less JSON for the browser to load into memory and parse.
This is estimated per language enabled on the instance, so this advantage multiplies for multi-language instances.
This was discussed here.
Expected Behavior
The browser should only have to download translations that will be used by the JS. After openfoodfoundation/wishlist#342 is done, these will be those under the "js." namespace.
Actual Behavior
All translations for each available language, even those accessed only by Ruby code, are downloaded by the browser.
Dependencies
openfoodfoundation/wishlist#342 is a prerequisite.
The text was updated successfully, but these errors were encountered: