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

Blazor-server canvas flickering #111

Open
Bobetti opened this issue Jun 7, 2021 · 2 comments
Open

Blazor-server canvas flickering #111

Bobetti opened this issue Jun 7, 2021 · 2 comments

Comments

@Bobetti
Copy link

Bobetti commented Jun 7, 2021

I'm trying to implement the following tutorials - https://github.com/mizrael/BlazorCanvas using blazor server side. But already on example nr.2 I see how any object is drawn on canvas is flickering.

I've made a test and created a separate solution with the same code, but instead using blazor wasm - no flickering at all.

That's the problem with blazor server?

@mizrael
Copy link
Contributor

mizrael commented Jun 7, 2021

hi @Bobetti , is there a particular reason why you want to use Blazor Server? All the calls to the HTML Context happen on the client-side, so I can think that flickering might be due to occasional calls to the backend which inevitably slow down the app.

If you definitely need to communicate with a server, I would suggest to expose an API (possibly with a fast transport like gRPC) and call it only when really necessary. Keep also in mind that Blazor WASM is single-threaded (for now) so any call will block the rendering.

@Bobetti
Copy link
Author

Bobetti commented Jun 8, 2021

Thing is, I'm writing a project management software using Blazor-server. As a small part of my service, I want to implement a whiteboard functionality for the image feedback process. Images are loaded from Azure blobs and clients can draw any comments on them.

Starting doing tutorials from the above post, I noticed, that even such a simple thing as - show an image on canvas - not suitable for Blazor-server, image is flickering all the time.

Seems to me I must find some other way around...

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