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

[Feature Request] Reduce allocation, reuse backbuffer, improve speed #54

Closed
ralfbiedert opened this issue Oct 15, 2019 · 2 comments
Closed

Comments

@ralfbiedert
Copy link
Contributor

Background

I am using plotters together with minifb to visualize real time sensor data. The combination is awesome, since both libraries are very lightweight, and it's easy to do portable, real-time UIs.

One implication is that all rendering is purely SW; plotters writes into a byte array, which minifb uses to update the frame buffer.

Unfortunately, in that process as of today, data has to be copied around multiple times for no reason other than plumbing, which costs precious CPU cycles.

Feature Request

  • What is the feature ?

Plotters' BitMapBackend should accept a user-provided byte buffer to render into; instead of allocating its own.

  • Why do you need the feature ?
  • What is the use case ?

See above; to reduce allocation, improve performance.

@38
Copy link
Member

38 commented Oct 15, 2019

Hi @ralfbiedert,

Thanks for the suggestion and PR.
The PR looks great to me and this is definitely the thing needs to be improved!.

Thanks again and I am going to dig into this a little bit and merge the PR!

@38
Copy link
Member

38 commented Oct 15, 2019

Your PR looks really nice and I like it. Seems this issue can be closed, feel free to reopen it if I forget anything. Thanks!

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

No branches or pull requests

2 participants