Notepad
Notepad copied to clipboard
Export/Import all notes to/from a single JSON file
Problem Description
A pain point for some users may be that exporting and importing notes can take quite a lot of time if they have on the order of 1000's of notes (for me it takes ~20mins).
Diagnosis and Proposed Solution
I ran export in an emulator with profiling and found that creating many files was causing the performance issues. I first tried using a snapshot as recommended by FSAF which is already supposed to be an improvement on the native android framework, but it made little difference. So I decided to try and make export and import work with just a single JSON file. This made export/import almost instant.
What's Missing
I haven't added translations for any language beside English.
Issues Out of Scope For Consideration
- I couldn't figure out how to do any exception handling for the coroutines or for exceptions that bubble up through
NotepadActivity.onActivityResult. If parsing fails the app crashes without any description of what happened.- might be nice to have an exception screen like NewPipe does
onCompletefor theArtVandeleyfunctions will finish running before the coroutines finish successfully or unsuccessfully.artVandelay.importNoteswill run theonCompletewhich notifies users that the import of notes was successful before it has actually finished successfully (maybe the toast can be moved inside the coroutine or we can chain coroutines, but I'm not sure)