Re:If you're happy with OpenBSD, probably any computer is go...
by alexchantavy on Sunday February 05, 2023 @05:40PM
(#34670496)
This sounds cool, you should write a blog on it
Re:If you're happy with OpenBSD, probably any computer is go...
by charcircuit on Sunday February 05, 2023 @06:00PM
(#34670711)
For those curious.
https://source.chromium.org/chromium/chromium/src/+/main:ui/...
An improvement would be to replace EncodeBGRASkBitmap with FastEncodeBGRASkBitmap so that it uses the fastest zlib level instead of the default (6). This is what the Linux X11 (ozone) implementation uses. This would be an easy fix to upstream if someone wants to do it.
Re:If you're happy with OpenBSD, probably any computer is go...
by andai on Sunday February 05, 2023 @06:16PM
(#34670881)
Yeah, like you said they literally already wrote the code that does that, not sure why they didn't use it. Setting compression to 0 is still 2 full seconds of lag for me (down from 8s), so there's still a lot of overhead. There are faster png implementations but I think re-encoding a 2MB JPEG into a 20MB PNG (to be re-encoded back to JPG by whatever program you paste it into) is kind of missing the mark.
Re:If you're happy with OpenBSD, probably any computer is go...
by charcircuit on Monday February 06, 2023 @04:12AM
(#34675114)
Funnily enough a CL moving the computation to a background thread was submitted a week ago. This would prevent the UI freeze.
https://chromium-review.googlesource.com/c/chromium/src/+/42...
I recently changed 1 byte in Chrome.dll and decreased the lag for copying large images by a factor of 2-3. (The UI freezes for 5-10 seconds. Turns out it's re-encoding a 2MB JPG into a 20MB PNG for the clipboard, at compression level 6 no less!)
I put up with it for years thinking there was nothing I could do, but one day I decided to ask some people smarter than me, and they gave me enough info to track down the code in IDA (I had never used it before).
My point is, motivation is a powerful thing!
(Offtopic but turns out Firefox copies the original file, so you can paste it right into Windows explorer—blew my mind!)