Replies: 8 comments 3 replies
-
The PDF indexing is disabled on iOS until a fix is published. If anyone with an iOS device wants to volunteer for testing and reporting, I can make some customs builds. If someone wants to work on a PR, I'll happily guide them, too. |
Beta Was this translation helpful? Give feedback.
-
A few initial thoughts: AFAIK Web Workers aren't fully supported on iOS devices (see example here, or here or here) natively which might cause errors in obsidian-omnisearch/src/lib.rs Line 8 in 342cdab PDF.js has had trouble recently on iOS: mozilla/pdf.js#15543 I couldn't find where the normal indexing step is, but perhaps the PDF indexer is competing for resources? |
Beta Was this translation helpful? Give feedback.
-
@bramses thanks for your references 👍 I guess the crashes are caused by a too high memory usage. As simple as that. There's not a single root cause. Omnisearch uses a lot of memory during indexing/refreshing. It eventually goes back down, Using my test vault as a reference: 1300 notes + 4000 PDFs (several novels)
Without the PDFs:
Honestly at that point I'm kinda fed up with this. I don't own an iOS device, and even if I did it won't allow me to diagnose anything. It's all trial and error and I think the solution will be to disable Omnisearch entirely to avoid crashes. |
Beta Was this translation helpful? Give feedback.
-
Update: the culprit is most likely the cache (de)serialization. I disabled the cache for iOS devices, and it looks like it stopped the crashes for at least one user. While I'm not satisfied with this solution, all other workarounds I tried were not better, and would have made cache management more complex. If your device keeps crashing, please add your input here with as much information as possible (number of notes, pdfs, copy of the console log). Thank you. |
Beta Was this translation helpful? Give feedback.
-
@scambier great find! These problems at this scale are very complex -- and break often, I imagine it will always be a WiP as devices evolve with time. I don't have any PDFs in my vault, but if I come across this bug, I'll follow up here. Thank you for the fix! |
Beta Was this translation helpful? Give feedback.
-
Update: I removed PDF indexing for all mobile devices (incl. Android), which should also reduce the risk of a crash. Even if it works technically, it's not worth the headaches. I prefer to propose a slightly inferior, but stable version of Omnisearch mobile, than something unstable. |
Beta Was this translation helpful? Give feedback.
-
I don't think I can do much more for this issue, since the crashes are more than likely caused by memory consumption. I'm doing my best to keep it as low as possible without compromising performances too much, but Minisearch does use a lot of RAM 🤷♂️ |
Beta Was this translation helpful? Give feedback.
-
Mobile is a pretty key part of the Obsidian experience for many users. It seems that a search plugin that "just works" should probably work on iOS/Android, so I imagine we should not discard it yet. Building a project like this is a lot of work and I genuinely appreciate it. A few ideas to support mobile:
I believe the last one could be the most flexible, and full OCR would not need to be done on each device. |
Beta Was this translation helpful? Give feedback.
-
Problem description:
Omnisearch causes an Obsidian crash on iOS
Your environment:
Beta Was this translation helpful? Give feedback.
All reactions