Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance optimisations (ideas wanted) #10

Open
Julusian opened this issue Jan 20, 2021 · 2 comments
Open

Performance optimisations (ideas wanted) #10

Julusian opened this issue Jan 20, 2021 · 2 comments

Comments

@Julusian
Copy link
Member

This is not optimised for running over a vpn or slow network. This is a list of ideas of things that could be investigated to improve performance:

  • in companion generate checksum for bitmaps and only send if not already 'known' by this remote. Instead of being sent every bitmap when the page changes, we could be more intelligent and only be sent new images if the checksum from above hasnt changed
  • compression of the bitmaps? (rle, png, gz)
@josephdadams
Copy link
Member

The checksum is a great idea. I used to do this in a streamdeck app I had before Companion and it dramatically improved performance in load times.

@mounte
Copy link

mounte commented Jan 22, 2021

look at: https://facebook.github.io/zstd/ for compression. Very fast, should be good enough and wide support for it.
Also these assets of 72x72 pixels rgb-values ?? Might be good to compress in one go, all images in one bulk to get better overall compression ratio... a good thing about zstd is that you can train it on a set of representative data for compression yielding better rates even for small sets like 72x72x3 bytes per icon (if not batched together).

No matter what I would add a small hook as soon as possible to the icon-pipeline, this hook should hash the data and create some statistics over unique hashes over time.
My guess is that you see many new hashes early on but most of them will be repeated moving forward in time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants