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

[question] render only changed component #137

Closed
naveenvhegde opened this issue Jul 3, 2021 · 3 comments
Closed

[question] render only changed component #137

naveenvhegde opened this issue Jul 3, 2021 · 3 comments

Comments

@naveenvhegde
Copy link

Hi, I came across this good library. I am thinking to write a coinwatch tui. mostly data source will be websocket. something like fx dashboard. is it possible to render the only box instead of whole laytout from other thread ? I see screen.Post(...) seems to render everything.

Please correct me If I am wrong, asking for suggestion best way to layout this fast ticking data.

@naveenvhegde naveenvhegde changed the title [question] render only changed box [question] render only changed component Jul 3, 2021
@ArthurSonzogni
Copy link
Owner

The UI is drawn when new events have been added, and the queue has been emptied.
This is why we use PostEvent(Event:Custom) => to force rendering a new frame.

I believe you shouldn't have to worry about performance. If 1000 events are sent at the same time, we won't render 1000 frame. Instead, we will empty the list of event, and then render one frame.

Do you perceive any performance issues?

@naveenvhegde
Copy link
Author

@ArthurSonzogni thanks. I have yet to start the project. If we render only level 1, bid and ask, then there might not be a performance issue. if need to render l2 depth of market data, then it will have impact - because data changes in sub second interval. Initially I will conflate the data from producer thread. Let's see how it goes.

Many thanks.

@naveenvhegde
Copy link
Author

closing for now.

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

2 participants