Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Chrome Google

Google's Chrome Browser is About To Get a Lot Faster (zdnet.com) 78

Google has shipped a new JavaScript compiler for its V8 JavaScript engine in Chrome called Sparkplug that promises a much faster web experience -- and it does it by 'cheating', according to the engineers on the project. From a report: Sparkplug is part of Chrome 91, which Google released on Tuesday with security updates but also some key changes under the hood that improve its powerful JavaScript engine, V8. Microsoft relies on V8 these days too after ditching its Chakra JavaScript engine from legacy Edge and moving to Chromium for the new Edge browser and switching to V8. Google says Chrome 91 has 23% faster performance thanks to Sparkplug's integration into V8's JavaScript pipeline.
This discussion has been archived. No new comments can be posted.

Google's Chrome Browser is About To Get a Lot Faster

Comments Filter:
  • by Anonymous Coward on Friday May 28, 2021 @11:24AM (#61431388)
    If only I could disable it and still have a functional web experience. It's the single biggest security threat that exists in 2021.
    • by Anonymous Coward
      Please point to the programming language that could provide the kind of web experience you'd like, and has had no security holes ever.
      • I, personally, question the experience altogether. I don't need sliding windows and gliding menus. Just like no frames, not turning on flash, there should be a usable no-javascript. The fact that every company on the planet thinks that as long as the document is done loading, everything is fine is just dumb.

        Just like google down-ranked pages that weren't optimized for mobile to force everyone's hand . . . I don't see why having a page that gets you the same functionality without the frills shouldn't be
        • While I agree that animated menus and windows are not needed, I disagree with the position that that's all javascript does. I'd point out that, in fact, animation is an extremely small piece of it's overall functionality.

          There are so many things JS does on even a simple page that to remove it would be akin to removing html, and in general this is to the end user's benefit.

          • All the things JavaScript does? Ah, you must mean all the surveillance it does. Yes, vitally important & we certainty need it to be more efficient. /End sarcasm
            • It can certainly be used for that, and I have no doubts that it is.

              It's also used for dynamic view generation that, were it absent, would necessitate a redesign of our backend servers to be radically less efficient. It's also used for UIX quality of life improvements.

              javascript is ever bit as critical to today's web as html.

              • It can certainly be used for that, and I have no doubts that it is.

                It's also used for dynamic view generation that, were it absent, would necessitate a redesign of our backend servers to be radically less efficient. It's also used for UIX quality of life improvements.

                javascript is ever bit as critical to today's web as html.

                UX? How about Twitter being sluggish to unresponsive on a mid-range smartphone. Just one example. In many cases, JS makes the UX worse.

        • by Synonymous Cowered ( 6159202 ) on Friday May 28, 2021 @01:55PM (#61431892)

          Let just look at Google Maps. How would you provide that sort of experience, outside of going back to 1990 and running the Microsoft Streets exe from your CD-ROM? I think a very nice map tool, where you can slide, zoom, toggle layers, do a search that drops pins on the map, click on those pins and get information about the business, switch to street view so you can get a real idea of what you expect to see as you drive up....those are all insanely valuable features, and I like being able to do it via a website with nothing to install. Dedicated native mobile apps partially fill that role, but I find the desktop web based maps a much nicer experience (plus, for all I know, the mobile apps may well be just a wrapper around the web app anyway). So how would you propose to do an experience like that?

      • No scripting at all is probably faster than any performance enhancement to the JavaScript interpreter. Executing nothing is faster than executing something. I can beat Usain Bolt if the race is unequal, he runs 100m and I run 0m. Of course nobody will be impressed, my 0m dash is not very flashy or entertaining to watch.

        I feel that a limited not Turing complete language that satisfies halting would be a good step in the right direction for a domain specific language used for document mark up. Although most o

    • If only I could disable it and still have a functional web experience. It's the single biggest security threat that exists in 2021.

      Seriously? Cite your sources. You can't. Your statement is made up.

      • I"m not a programmer, so I"m unsure if this is accurate, but it certainly looks to be a good source
        https://www.securecoding.com/b... [securecoding.com]

        • by narcc ( 412956 )

          As it turns out, not very accurate at all. Everyone here is looking for vulnerabilities caused by client-side JavaScript in web browsers, something not addressed by your link, save a generic XSS thing.

      • by theCoder ( 23772 )

        While it is unlikely that JavaScript will be able to install malware on your computer, there are some things that JavaScript can do that are likely undesirable. Things such as cryptocurrency mining and privacy violations through various trackers. Not to mention just being annoying like stealing hotkeys. As an example, Jira steals alt+1, alt+2, etc to do things in Jira instead of switching to the first, second, third, etc tab. Other sites capture "/" to put focus in the search bar when I want to search i

    • Thats why any developer company worth its salt uses CSP (Content Security Policy) to protect against any JavaScript or CSS not coming from predefined sources. There are plugins that disable them, but just like the os cant protect users that install malware themselves, developers cant protect users that install malicious browser plugins
    • If only I could remove computers from my network and still have a functional workforce. It's the single biggest security threat that exists in 2021.

      You want more functionality, you take on more risk/expense. It's an inherent issue for any technology space.

  • by oldgraybeard ( 2939809 ) on Friday May 28, 2021 @11:25AM (#61431392)
    they are removing all the tracking, telemetry and ad spewing parts. Right!! wink wink
  • by Bandwidth_ ( 91035 ) on Friday May 28, 2021 @11:28AM (#61431412) Homepage Journal

    Like always, to google and other mega-corps, the web is javascript and that's what they'll concentrate on. Browsers are now virtual machines designed for running opaque DRM applications instead of of actual HTML and files being served.

  • Security? (Score:5, Insightful)

    by SuperKendall ( 25149 ) on Friday May 28, 2021 @11:28AM (#61431414)

    Just curious if this kind of "cheating" is the kind that leads to additional security vulnerabilities, I get nervous when I see statements like "thanks to Sparkplug's integration into V8's JavaScript pipeline.".

    • *All* contemporary implementations of dynamic languages gain performance by "cheating". Every mainstream JS implementation is fast because of "cheating". Even Java is fast because of "cheating" -- Java got its cheating methods in HotSpot from StrongTalk (in fact, so did Google's V8). But you can always cheat if you don't get caught, so everything is fine as long if you can pretend to not have cheated when caught.
      • *All* contemporary implementations of dynamic languages gain performance by "cheating".

        "Cheating" is faster because it has fewer letters than "Do no evil".

      • I must admit I am not really sure how Java is "cheating", and nor am I sure how Google's new Javascript compiler is cheating. Can someone explain what is cheating about either of these -- all I read was sound sensible engineering to improve performance.
    • by jensend ( 71114 ) on Friday May 28, 2021 @01:19PM (#61431774)

      No. As I said in another comment [slashdot.org], the emphasis on "cheating" is simply bad journalism, making too much of one careless phrase in the v8 dev blog [v8.dev]. The only "cheating" is that the non-optimizing compiler takes the interpreter's bytecode as its input rather than re-parsing etc from scratch. If using the interpreter's bytecode were a security problem, it would already be a security problem with the existing interpreter.

      • No. As I said in another comment [slashdot.org], the emphasis on "cheating" is simply bad journalism, making too much of one careless phrase in the v8 dev blog [v8.dev].

        Quite so. It is dangerous to make a humorous remark, or an colorful but inexact analogy to a reporter. They are certain to glom on to that and highlight it as a key focus of their piece. I have seen New York Times journalists take a single remark out of context to misrepresent a major study. Since even reading the abstract is too hard for a reporter.

    • Re:Security? (Score:5, Informative)

      by AmiMoJo ( 196126 ) on Friday May 28, 2021 @03:22PM (#61432160) Homepage Journal

      Much better explanation on their blog: https://v8.dev/blog/sparkplug [v8.dev]

      It's not really cheating. Basically they have an interpreter and they have an optimising compiler. They inserted a new compiler between the two.

      The new one is non optimising, it's goal is to just build a binary as fast as possible to eliminate a lot of the interpreter overhead. That way they can start executing as fast as possible while the optimiser works away.

      It's actually a very simple compiler, basically just turns the interpreter bytecode into a series of function calls.. Very similar to old BASIC compilers like the AMOS one.

      • Hmm, it sounds OK on the face of it I guess... although with two forms of binaries being run (optimized and non-optimized) it seems like that possibly increases security risks since you have two paths modifying/creating executable code.

        • by jensend ( 71114 )

          It's conceivable that there could be an exploitable bug in the new non-optimizing compiler. But that wouldn't be a security impact from the "cheating." If the non-optimizing compiler were "not cheating," i.e. doing its own independent lexical, syntactical, and semantic analysis &c of the Javascript source code, this could open possibilities for new security risks. Using the interpreter's bytecode avoids those possibilities.

          As I said above, if using the interpreter's bytecode were a security problem, it

      • It's actually a very simple compiler, basically just turns the interpreter bytecode into a series of function calls.

        Fun fact, it's called "threaded code" and has nothing to do with threads.

        https://en.wikipedia.org/wiki/... [wikipedia.org]

        Very similar to old BASIC compilers like the AMOS one.

        I didn't know that.

        BBC 4 lyfe

        • by AmiMoJo ( 196126 )

          Thanks, that's interesting. Written a few systems like that without knowing the terminology.

          I remember BBC BASIC was very fast for an interpreted language. Only really used it much on the Archimedes though.

  • No it won't (Score:5, Insightful)

    by Anonymous Coward on Friday May 28, 2021 @11:45AM (#61431484)

    Even if the javascript engine gets a lot faster, the browsing experience will remain the same as the number of javashit tracker, miners popups and malware expand to restore your usual browsing speed.

    • Even if the javascript engine gets a lot faster, the browsing experience will remain the same as the number of javashit tracker, miners popups and malware expand to restore your usual browsing speed.

      Well, yeah - Google likes to sell these things as if they're a benefit for you, but it's really about cramming more and more telemetry and advertising into your web experience.

    • Re: (Score:2, Interesting)

      Webpages today don't render any faster than they did back in 1998 with a low end Pentium. The hardware is orders of magnitude faster.

  • FTA: "The Sparkplug compiler sits between V8's Ignition bytecode interpreter and the TurboFan optimizing compiler."
    • by Viol8 ( 599362 )

      Yeah, its all a bit wannabe isn't it. You can just imagine the pasty faced devs sitting in a basement wishing they were working on something a bit more macho than a browser engine so co-opt the naming as a plan B.

    • FTA: "The Sparkplug compiler sits between V8's Ignition bytecode interpreter and the TurboFan optimizing compiler."

      TurboFan? What is this, the batmobile?

  • Who cares about its speed.
    They are using that to coax users to run their applications in their cloak anyway.
    Nowadays your browser is a major entry point into one's computer and tool for surveillance that expands far above browsing habits.

  • by jensend ( 71114 ) on Friday May 28, 2021 @12:12PM (#61431590)

    and it does it by 'cheating', according to the engineers on the project

    This is just about the dumbest possible takeaway from the linked dev blog.

    They say the existing compiler "TurboFan" optimizes well at the cost of relatively high compilation time. The browser often won't decide that this compilation time is worth it, so too much JS gets executed much more slowly on the interpreter. So they're adding a second compiler, "SparkPlug," that takes bytecode from the interpreter and outputs machine code directly without analysis or optimization.

    The 'cheating' in the dev blog only refers to using the interpreter's bytecode rather than parsing &c afresh.

    This is hardly the first time that browser makers have added faster, more naive compilation stages that eat bytecode - for instance, Mozilla's JaegerMonkey back in 2010. Browser makers are always juggling the optimization benefits vs compilation time tradeoffs.

    • I'd imagine that tech journalists often know better, but use such words to draw in the non-techy, emotionally-driven, audience.
  • What extra bit of privacy will we have to lose, or which extra incompatible Google-only bit of webery will this marvelous browser quietly make ubiquitous until it becomes unavoidable?

    Google never does anything for its own safe. There has to be something unpleasant behind the shiny facade.

  • without JS they wouldn't have reCaptcha. without JS cloudflare wouldn't be able to perform "are you robot", ie the robot which didn't pay them for pass through.
    • I wouldn't mind going back to days of old when we found what we needed with text based "browsing" using gopher, NNTP, mutt and FTP etc.
      • by narcc ( 412956 )

        I always thought that had gopher "won", it would have made mobile browsing much nicer in the days before smartphones -- and a bit better in the days afterward!

        But let's not pretend that gopher would have remained just as was. It would have evolved just like the web evolved as users demanded more. It may have even evolved faster, as Gopher was so easy to implement.

        I can imagine all sorts of horrible ways gopher could have grown that are far worse than what we have now. Its so much more formal and rigid t

  • Laptop fan (Score:4, Funny)

    by gladish ( 982899 ) on Friday May 28, 2021 @01:28PM (#61431798)
    Does this mean the fan on my laptop will finally stop?
  • Nope (Score:5, Insightful)

    by ChangeOnInstall ( 589099 ) on Friday May 28, 2021 @01:29PM (#61431810)
    Any performance improvement in Chrome will only result in content and advertising companies throwing more garbage down the pipe.

    Improving JavaScript performance simply improves the number of lines of code that can be executed while a website runs one core at 100% busy-looping/doing effectively nothing. Adware developers don't particularly care about your computer or the cumulative energy cost of operating their product.

    Run an ad-blocker and help save the planet: https://www.google.com/search?... [google.com]
    • We should just go back to gopher with in-line thumbnails and allow blank ads to compute x million hashes for crypto, then give you a cut. Any website that then shows you ads on top of it forfeits their crypto profits.

  • The flag to disable this buggy and useless tab bar mouse/trackpad scroll doesn't work. HOLY crap it's annoying and they inflicted it on Linux users first. It sucks and is a total disruption to workflow. Google adding features that aren't baked and can't be turned off seems to be the norm today.

  • I keep seeing these stories about improvements in browser speed once in a while.
    I've been using computers since around '95, I've seen my share of issues with browsers; crashes, eating up ungodly amounts of RAM, etc, but I never felt browser speed or its efficiency in running Javascript was an issue that affected me in any noticeable way.
    What am I missing?

    • by caseih ( 160668 )

      You probably don't use Google on-line applications then. Google Voice is slow as molasses and often just stops working entirely. Google Docs can also struggle sometimes. Why they thought a ton of javascript was a good idea when GV worked just fine before without it, I do not know. Google also needs JS to run faster so that their tracking and ad systems won't get noticed as much by the end user.

      • Google Voice is abandonware, a relic from a time when they needed to collect TB of voice samples to train their RNNs for realtime human speech recognition and synthesis.

  • Today Chrome asked for a reboot to upgrade. After that I had several pages fail to load and still having the problem.
    Firefox works fine on those pages.

  • The last few releases of Chrome have ‘protected’ us from able to print displayed pages. Will Google finally recognize this as a bug, not a feature, and fix it?

  • Pointless. Browsers today are 1,000 faster than browsers from 10 years ago, running on what would be literal supercomputers, but the Internet doesn't feel faster. Why bother increasing the speed of browsers when webdevs will just throw more javascript and bloat onto websites?

  • I find most of the web unwatchable without noscript. Except more and more sites are unusable with noscript enabled. Without noscript there are continuous, slide-ins, overlays and pop-ups offering to install a windows update. I assume noscript won't work with Sparkplug.
  • Wow! In the ever-morphing automotive world from fossil fuel to EVs, we can still drive a "V8"!

"Ninety percent of baseball is half mental." -- Yogi Berra

Working...