akaalias / obsidian-extract-pdf-highlights

Extract highlights, underlines and annotations from your PDFs into Obsidian
212 stars 10 forks source link

Prevent rendering pages without annotations #11

Open steven-kraft opened 3 years ago

steven-kraft commented 3 years ago

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

kimcen commented 3 months ago

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.