MaddTheSane / Simple-Comic

macOS comic viewer
MIT License
261 stars 23 forks source link

Fix: Frequent software freeze since 1.9.3 update #76

Closed DavidPhillipOster closed 2 years ago

DavidPhillipOster commented 2 years ago

Pull request of OCRTracker.m, & OCRTracker.{h,m} that cancels OCR requests once their result is no longer needed. This fixes Frequent software freeze since 1.9.3 update #74 Tested with the Japanese document from @Patalliro8 - Before, after using next/previous to go all the way through the document and back a total of 4 times, I'd see the symptoms. After, RAM usage stays low, and responsiveness is still good.

nickv2002 commented 2 years ago

Thanks! If this looks good to @MaddTheSane also we can merge and send to Apple.

nickv2002 commented 2 years ago

Great, I've built this and sent to build over to Apple for a new release (version 1.9.4)

Patalliro8 commented 2 years ago

Thank you very much for the fix!! Is there any chance we may have an ability to turn off the Live Text feature entirely in the future? I still seem to encounter the large memory usage and eventual freeze with version 1.9.4 (290).

DavidPhillipOster commented 2 years ago

@Patalliro8 your bug reports have helped me get the bugs out of that feature - problems I'm not seeing. So if you have steps to reproduce, please file them as issues. Before June 24 I will submit a pull request that adds a checkbox to preferences to turn the feature off. (You'd think that just adding a checkbox would be simple, but I have to cope with localization issues, with the user changing the state of that checkbox while in the middle of reading a book, and that feature powers future features I'm working on: a Find command, and Spotlight indexing.)

DavidPhillipOster commented 2 years ago

https://github.com/MaddTheSane/Simple-Comic/pull/79 is a start. It will let you turn off the feature from Terminal even before there is a checkbox in the U.I.