Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Wednesday July 17 2019, @02:29PM   Printer-friendly
from the not-all-bad dept.

Submitted via IRC for AnonymousLuser

Facebook open-sources Hermes JavaScript engine to improve React Native Android app performance

Facebook is continuing its open-sourcing spree with the launch of a new JavaScript engine designed to improve the performance of big apps on Android devices, the company announced today at the Chain React conference in Portland, Oregon.

Mobile apps are getting increasingly larger, which can pose problems — particularly for devices with limited storage or processing power. This is one reason many big tech firms, including Spotify, Uber, and Facebook itself, have taken to launching “lite” versions of their apps. But what if developers could improve the performance of their main apps by using an optimized JavaScript engine that reduces the download size and boosts startup performance?

That’s what Facebook set out to do first with its own suite of apps, for which it developed the Hermes JavaScript engine, which is now available on GitHub for any developer to use.

“To increase the performance of Facebook’s apps, we have teams that continuously improve our JavaScript code and platforms,” the company wrote in a blog post. “As we analyzed performance data, we noticed that the JavaScript engine itself was a significant factor in startup performance and download size. With this data in hand, we knew we had to optimize JavaScript performance in the more constrained environments of a mobile phone compared to a desktop or laptop.”

According to Facebook, Hermes helps improve three core app attributes: time-to-interact (TTI), which is the time it takes from launching an app to when it becomes fully loaded and usable; download size (Android .APK size); and memory utilization.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by The Mighty Buzzard on Wednesday July 17 2019, @06:55PM (3 children)

    by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Wednesday July 17 2019, @06:55PM (#868155) Homepage Journal

    So, pretty much never then? Reloading a single element is good for convenience but the overhead of being able to do so means you lose more than you will ever gain right off the bat.

    --
    My rights don't end where your fear begins.
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by JNCF on Wednesday July 17 2019, @07:50PM (2 children)

    by JNCF (4317) on Wednesday July 17 2019, @07:50PM (#868182) Journal

    Pretty much always, assuming spherical cows and arbitrary developer time (there are weird exceptions, like iframe content that refuses to run after first render for security reasons thus requiring a full page load anyway). Defer the script, no overhead until after the initial render. Provide basic html fallbacks so everything works the old slow way before the script is finished and the fancyshmancy element swapping is ready.

    • (Score: 2) by The Mighty Buzzard on Thursday July 18 2019, @11:23AM (1 child)

      You can't defer script loading of core site functionality and achieve anything useful. There's a very good reason we're so much faster and more responsive than say a similar green site that's in love with javascript.

      --
      My rights don't end where your fear begins.
      • (Score: 2) by JNCF on Thursday July 18 2019, @12:52PM

        by JNCF (4317) on Thursday July 18 2019, @12:52PM (#868471) Journal

        With basic html fallbacks, yes you can. Deliver basic-bitch links with unique id attributes, then have the JS replace them with elements that have click events triggering element swaps instead. Forms are only slightly more complicated, totally doable. The Green Site isn't doing isomorphic rendering and rehydration with defered script loading and basic html fallbacks, and I never claimed their use of JS is clever. JS can be a huge win for user experience if used cleverly and tactfully, but it rarely is. It's a developer time/education issue, I'm betting there are some polished frameworks making this behavior easy by the end of next decade. In the meantime it's a mess to set up, but the end results are glorious.