Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export/Import all notes to/from a single JSON file #161

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

superjkl
Copy link

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
  • onComplete for the ArtVandeley functions will finish running before the coroutines finish successfully or unsuccessfully.
    • artVandelay.importNotes will run the onComplete which 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant