Skip to content

Prevent rendering pages without annotations #11

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

steven-kraft
Copy link

Since rendering a page is a somewhat costly operation, pages shouldn't be rendered unless getAnnotations() returns more than 0 annotations. Otherwise, there is no reason to render. This will greatly reduce the processing time, and will likely make the plugin feel more responsive than it currently is.

Resolves #10

Since rendering a page is a somewhat costly operation, pages shouldn't be rendered unless getAnnotations() returns more than 0 annotations. Otherwise, there is no reason to render. This will greatly reduce the processing time, and will likely make the plugin feel more responsive than it currently is.
@kimcen
Copy link

kimcen commented Mar 11, 2024

Thanks! Since the original author has abandoned this repo, I had to learn how to build this, with the help of chatgpt, then made the changes you commited to the code and the processing time went from 7 minutes and 40 seconds down to 4 seconds.

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

Successfully merging this pull request may close these issues.

Unnecessary page rendering when extracting highlights
2 participants