Closed kirlut closed 3 years ago
We chose not to pretty-print intentionally to save on overall raw text size. I would think raw unpretty JSON would be easier to parse for a system? I don't believe this would make a difference overall. If you have any screen recordings to demo this that would be helpful.
@mobitar I'll record one for you. How can I send it?
@mobitar just sent you an email.
Your intention to save storage space is totally understandable. So may be change request might described from the different point of view: improve your Android app, to make it able to handle very long (dozens of thousand symbols) strings.
[....] So maybe change request might described from the different point of view: improve your Android app, to make it able to handle very long (dozens of thousand symbols) strings.
Hi @kirlut, here's at least part of the reason as to why that is:
Android operates with very tight memory conditions for our app for some reason. You will not have an issue with quantity for the large part, but only if you have some particular notes that are excessively large. If maintaining compatibility with the Android app is important, I recommend not exceeding 2MB per note (or even 1MB).
@JaspalSuri Hi!
No, root of this particular issue is long line, not the total size of the file, Both files I use to reproduce are less then 200 kb.
@JaspalSuri @mobitar @johnny243 please see the issue I've created: https://github.com/standardnotes/mobile/issues/433
Hi @kirlut! Thanks for reporting this 🙂 I was able to replicate https://github.com/standardnotes/mobile/issues/433
Since this is an issue that affects not only the Secure Spreadsheets editor, perhaps we should investigate the root cause.
This PR may fix the issue, but it also increases the note size.
@johnny243 yeah, despite as user I would be happy to have this fix right now, as engineer I tend to agree with @mobitar. Prettifying of all jsons will waste your storage space, so it's better to find and fix the root issue. Or make prettifying optional and disabled by default.
Saving content in a single-line make it impossible to use in Android app (application either open files for 2-3 seconds or crashes). Saving content as indented solve this problem, but extension do it single-line again on change.
This should fix it.