Live data from Hacker News

Blinking Cursor Turns 54

hackaday.com

51–52 of 52 posts

Re: Blinking Cursor Turns 54

#51
post #47

Earlier quoted context omitted.

> No, it's caused by modern desktops being composited. Changing a single pixel in a window requires a full surface flush of that window to the GPU. So evolution. Does this mean that a laptop with lower screen resolution has better battety life ? It explaines why Win 10 is so crappy with screen and cursor updates.

A laptop with a lower screen resolution has entered battery life but that has more to do with the fact you need brighter backlights to get the same brightness from a more dense panel. Pretty common to see 1080p versions of laptops that also have 4K options have significantly more battery life.

Exactly why I hate how laptop manufacturers shove 4K displays into laptops just because it sounds impressive. 4K is more dense than any laptop needs (maaayyyybe 17" ones benefit, but at that size they're optimized for performance at the expense of battery life anyway). Would be great if more laptops had resolutions between 1080p and 4K so things can look sharp without being too hard on battery life.

Re: Blinking Cursor Turns 54

#52
post #20

Earlier quoted context omitted.

“A blinking cursor can have a significant effect on battery life, as such we decided to change the default to non-blinking.” Sublime Text 4 Update FAQ, May 2021 https://forum.sublimetext.com/t/sublime-text-4-update-faq/58...

Haha, that's probably an electron app. Or they use a really buggy UI framework. Otherwise, I wouldn't know why updating a 4x8 pixel block would cause a significant amount of power usage. Especially if a 286 could do it no problemo.

Combining the replies from zamadatix, jablan, 323, and jpe90, it seems to me like the UI framework is the culprit and could be (should be?) improved.

If using the API's correctly, the compositor can be limited to only updating a small part of the screen. If really only switching the cursor between on and off, that'll happen roughly once per second. And lastly, the whole thing can be skipped completely if the cursor happens to be invisible, for example if the editor is minimized or (partially or fully) obscured by other windows.

Post reply on HN