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

Very slow drawing speeds on cards with a large amount of content offscreen #10

Closed
orangelover12 opened this issue Sep 23, 2023 · 5 comments
Assignees

Comments

@orangelover12
Copy link

First of all, I would like to say that I am really enjoying using the addon and thank you very much.
I am using this addon every day and I found one error.
For some cards that contain large photos or a lot of text, the speed is extremely slow. If possible, could you please correct the error? thank you

@rin-w
Copy link

rin-w commented Sep 23, 2023

i assume the add-on is running on an average laptop or some portable device.

either way, this may have something to do with hardware limitations rather than errors. on the software side, we most likely could only do so much to optimize performance on heavy elements. you could maybe try and reduce your screen DPI or window resolution, however, you will get less view space with the latter. you may also try and use an older anki version (especially the versions before qt6 were introduced), but there may be features that you use in newer versions which aren't available.

furthermore, i also assume you already enabled hardware acceleration. if you haven't please read the add-on description on ankiweb or this repository.

@Rytisgit
Copy link
Owner

As rin-w said, first could you confirm that you have tried to enable hardware acceleration. For QT6 the method is running a cmd command echo auto > %APPDATA%\Anki2\gldriver6 https://github.com/Rytisgit/Anki-StylusDraw/raw/master/docs/qt6fast.png

for QT5 the method is selecting a different option from the settings menu of the video driver: https://github.com/Rytisgit/Anki-StylusDraw/raw/master/docs/dontUseSoftwareRendering.png

You will need to restart Anki after both.

You can also do a quick test of trying the drawing on the standalone website here: https://rytisgit.github.io/Anki-StylusDraw/ , since browsers have hardware acceleration by default these days, and see if the drawing is still slow.

@orangelover12
Copy link
Author

Thank you for answer.
I am currently using version 2.1.65, QT6 of anki on my laptop, and I have enabled hardware acceleration.
I took the advice and tried it on my desktop at home and found that it worked properly.
It seems to be a hardware problem with my laptop.

Thank you both so much for your answers.
I wish you all the best!

@Rytisgit
Copy link
Owner

Rytisgit commented Sep 29, 2023

@orangelover12 It was not clear initially what your problem was, but I have understood it now. I added a follow screen mode and small canvas mode, so that drawing speed is not influenced by the size of the card making the canvas very big offscreen. you can try it out by downloading the newest version and toggling either of the modes using these new options: https://github.com/raw/Rytisgit/Anki-StylusDraw/master/docs/followScreenOnBigCards.png

@Rytisgit Rytisgit changed the title Very slow speeds on some cards Very slow drawing speeds on cards with a large amount of content Sep 29, 2023
@Rytisgit Rytisgit changed the title Very slow drawing speeds on cards with a large amount of content Very slow drawing speeds on cards with a large amount of content offscreen Sep 29, 2023
@Rytisgit Rytisgit pinned this issue Sep 29, 2023
@Rytisgit Rytisgit self-assigned this Sep 29, 2023
@orangelover12
Copy link
Author

I just finished updating the addon. This update is much better than I hoped for. Using a smaller canvas eliminated all the problems I had before. Thank you so much for including this amazing feature. I wish you all the best!

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