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

investigate sixel quantization speedup via final pass #1452

Closed
dankamongmen opened this issue Mar 24, 2021 · 5 comments · Fixed by #2514
Closed

investigate sixel quantization speedup via final pass #1452

dankamongmen opened this issue Mar 24, 2021 · 5 comments · Fixed by #2514
Assignees
Labels
bitmaps bitmapped graphics (sixel, kitty, mmap) perf sweet sweet perf
Milestone

Comments

@dankamongmen
Copy link
Owner

Throughout sixel quantization, I kept harping on the importance of a single pass. During relaxation, we "unzip" and "rezip" various bands when splitting them, to avoid doing a final pass over all the data. In doing so, though, we do several passes (in many cases). Instead, simply perform relaxation, and then do a final pass fitting the sixels. This also leaves us in a good position to replace the quantization algorithm with another one, rather than being wedded to relaxation.

@dankamongmen dankamongmen added the perf sweet sweet perf label Mar 24, 2021
@dankamongmen dankamongmen added this to the 2.3.0 milestone Mar 24, 2021
@dankamongmen dankamongmen self-assigned this Mar 24, 2021
@dankamongmen dankamongmen added the bitmaps bitmapped graphics (sixel, kitty, mmap) label Mar 24, 2021
@dankamongmen
Copy link
Owner Author

Given that alacritty is likely to have the graphics branch land soon, and the general increased interest in terminal bitmaps, I think it would be wise to do this sooner rather than later. We don't want someone to go benchmark us and publish an unflattering view. This is probably the next thing to work on, actually.

@dankamongmen
Copy link
Owner Author

note that libsixel is back in play thanks to @ctrlcctrlv's recent fork. so maybe we needn't bother with this ourselves.

@ctrlcctrlv
Copy link

@dankamongmen this is probably going to be something you need to contribute, or at least give me more detail as to how to write it. Right now I'm mostly focused on adding important missing features, not optimizing what's already there. Without transparency it's not useful for kitty at all, for example. Also the inability of the decoder to handle multiple palettes is an issue.

@dankamongmen
Copy link
Owner Author

@dankamongmen this is probably going to be something you need to contribute, or at least give me more detail as to how to write it. Right now I'm mostly focused on adding important missing features, not optimizing what's already there. Without transparency it's not useful for kitty at all, for example. Also the inability of the decoder to handle multiple palettes is an issue.

oh sure. what i meant is that libsixel is faster than my quantization right now, at least for most images. if i move to libsixel, it ought be an immediate performance win.

@dankamongmen
Copy link
Owner Author

I think we'd be wise to improve sixel performance before releasing 3.0.0. Prioritizing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bitmaps bitmapped graphics (sixel, kitty, mmap) perf sweet sweet perf
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants