Slashdot Mirror


Blinking Cursor Devours CPU Cycles in Visual Studio Code Editor (theregister.co.uk)

An anonymous reader shares a report on The Register: Microsoft describes Visual Studio Code as a source code editor that's "optimized for building and debugging modern web and cloud applications." In fact, VSC turns out to be rather inefficient when it comes to CPU resources. Developer Jo Liss has found that the software, when in focus and idle, uses 13 percent of CPU capacity just to render its blinking cursor. Liss explains that the issue can be reproduced by closing all VSC windows, opening a new window, opening a new tab with an empty untitled file, then checking CPU activity. For other macOS applications that present a blinking cursor, like Chrome or TextEdit, Liss said, the CPU usage isn't nearly as excessive. The issue is a consequence of rendering the cursor every 16.67ms (60 fps) rather than every 500ms.

10 of 236 comments (clear)

  1. Holy Blinking Cursor, Batman! by BeerCat · · Score: 5, Funny

    13 per cent CPU. For a blinking cursor. That's... impressive.

    But not in a good way

    --
    "She's furniture with a pulse"
    1. Re:Holy Blinking Cursor, Batman! by lgw · · Score: 4, Funny

      Yeah, my old Commodore 64 had a blinking cursor, and it somehow managed that remarkable feat with an 8-bit 6510 CPU running at 1MHz!!!

      Behold the power of Javascript! It gives a modern PC with 8-16 GHz of total CPU ... less actualy processing power than a Commodore 64.

      Well done JS engine guys. Well done.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    2. Re:Holy Blinking Cursor, Batman! by bored · · Score: 3, Funny

      You probably just made it consume 100% of the CPU as it tries to flash the cursor at an infinite rate...

    3. Re:Holy Blinking Cursor, Batman! by arglebargle_xiv · · Score: 4, Funny

      "Tell me what a class invariant is."
      Blank stare.
      "What is the Liskov substitution principle?"
      Deer in headlights.

      Prove that every even number > 2 can be expressed as the sum of 2 primes

      Empty look.

      Show that the Riemann zeta function has its zeros only at the negative even integers and complex numbers with real part 1/2.

      Panicked expression.

      Demonstrate that If k graphs each having k vertices have the property that every pair of complete graphs has at most one shared vertex then the union of the graphs can be colored with k colours.

      Runs from room.

      Sigh, kids these days...

    4. Re:Holy Blinking Cursor, Batman! by drnb · · Score: 3, Funny

      Opening VIM is the easy part. If you can successfully CLOSE VIM afterwards, that's the passing point.

      Extra credit for a minimal number of beeps while using it. :-)

  2. That's what you get... by Kormoran · · Score: 4, Funny

    ...when you hand the task over to the HALO crew. Absolutely NO flicker, man. Oh, wait...

  3. Maybe they shouldn't use Javascript ... by drnb · · Score: 5, Funny

    13% of CPU at 60 fps. Maybe they shouldn't use Javascript and a cross platform framework for drawing the cursor. ;-)

  4. 60 FPS is the minimum these days by tobiasly · · Score: 5, Funny

    Well I would hope that a modern IDE released in 2017 would have 60 FPS! I also have the 4K cursor, HDR cursor, 3D cursor, Retina cursor, and VR cursor plugins all enabled, but I realize that may be overkill for some people. As soon as I get my new water cooling rig set up it'll be buttery smooooth.

  5. Re:Devil in the Details... by DontBeAMoran · · Score: 1, Funny

    When you watch porn, all your screen is a "dirty rectangle".

    --
    #DeleteFacebook
  6. Re:Probably a minor oversight. Will likely be fixe by DickBreath · · Score: 5, Funny

    Please do not knock Emacs.

    Emacs is very popular. Popularity seems to correlate highly with the set of users who once started up Emacs, were unable to figure out how to exit from Emacs, then had no choice but to write Emacs Lisp extensions to accomplish all other necessary tasks.

    I don't think VS Code can make that claim.

    --

    I'll see your senator, and I'll raise you two judges.