You are browsing as a guest. Sign up (or log in) to start making projects!

1h 52m 50s logged

Devlog #7 - Making MILO Much Faster

I spent almost 2 hours improving MILO’s search performance.
I found a pretty bad bug where searching a large folder like Downloads could take 7+ minutes because MILO was trying to process too many PDFs, including scanned PDFs that required OCR.
I changed the search system so MILO now does a much faster process:

      ↓
Check normal PDF text
      ↓
Only OCR likely scanned PDFs
      ↓
Cache the OCR result
      ↓
Return the result

I also added an OCR limit so MILO doesn’t try to OCR hundreds of unrelated PDFs:
MAX_OCR_CANDIDATES = 30
Another important improvement was OCR caching. Once MILO reads a scanned PDF, it saves the extracted text so it doesn’t have to OCR the same file again unless the file changes.
I also added more ignored folders like:

.git
__pycache__
.venv
.next
dist
build
.cache

This helped remove a lot of irrelevant files from searches.
After the changes, the Spider-Man ticket search that was taking several minutes became much faster while the scanned EduWW Verification of Enrollment PDF still works with OCR.

0
25

Comments 0

No comments yet. Be the first!