4 ms·
“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 202
by jpe90 5y ago
“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/58001 https://forum.sublimetext.com/t/sublime-text-4-update-faq/58...
- fxtentacle 5y agoHaha, 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.
- 323 5y agoNo, 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. There are ways around it, but it requires direct interaction with the compositor, which while supported by the APIs, it's more complicated.
- hulitu 5y ago> 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.
- salamandersauce 5y agoA 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.
- ziml77 5y agoExactly 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.
- deleted 5y ago[deleted]
- zamadatix 5y agoSublime is a native C++ app. It uses a minimal custom framework built on top of I think skia which actually mediates the drawing on hardware devices (or the CPU). As described by the articles the power usage comes from causing the hardware to repeatedly exit a low wattage deep idle state to update the UI not to do with the amount of work required to render the update. This is actually more noticeable for efficient apps than inefficient/bloated apps as the latter don't get as many chances to enter deep idle states in the first place.
- jablan 5y ago> repeatedly exit a low wattage deep idle state to update the UI There's a considerable difference in doing that once a second and dozens (hundreds? thousands? depending on how it was implemented) times a second, which I would assume what the previous default ("smooth") setting meant.
- jpe90 5y agoIt’s a native c++ app https://news.ycombinator.com/item?id=2822114 https://news.ycombinator.com/item?id=2822114
- csdvrx 5y agoThe tone of your reply is inappropriate. Any apps that cause a change in the content displayed risk causing wakeups on the GPU. It's true whether it's a terminal emulator, a browser or an office suite. GPU power saving loves static content (OLED screens don't, but that's another story)
- SketchySeaBeast 5y agoOne of sublime's selling points is that it's not an electron app.
- lttlrck 5y agoA 286 didn't do anything to flash a cursor in e.g. VGA text mode - the graphics adapter did using a counter controlled by the refresh rate.
- fxtentacle 5y agoCombining 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.