neutrinolabs / xorgxrdp

Xorg drivers for xrdp
Other
428 stars 108 forks source link

Switch to wyhash from CRC for capture tile diff #301

Closed metalefty closed 2 months ago

metalefty commented 3 months ago

This is a cut out of #167 and a effort to address #300, originally suggested by @trishume. Removed scroll detection for simplicity at the moment.

After switching to wyhash, CPU usage is reduced by 1/2 to 1/3. I think there is more room to reduce using other hash algorithm with hardware acceleration.

metalefty commented 2 months ago

I tested both wyhash and xxhash64 with lazy color convert. See #300 for results. I'm inclined to use wyhash.

@jsorg71 @Nexarian @matt335672 Any thoughts about which hash algorithm to use?

jsorg71 commented 2 months ago

I'll agree meta, I feel like we vetted wyhash well. I'm not concerned about the author as this is not used for security.

matt335672 commented 2 months ago

I think you've done a great job looking at this @metalefty. Because wyhash has been tested already, that would be my preferred option. You've also shown that replacing this in the future is straightforward, if we need to.

metalefty commented 2 months ago

Merging this.