nextcloud / nextcloud/notes-android

Typing in long md files is slow (~1s delay)

Open
#3,162 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug
Dominant language
Java
Stars
1.1k
Forks
168
Avg merge
1d 17h
Merged PRs (30d)
31

Description

This issue respects the following points:
Describe the bug

First of all, sorry in advance if this issue is "wrong" here. I did a check and this affects the Markdown web editor and the editor in the Notes server app aswell. Do with it as you please.

Got a couple of very long notes files. 5000 lines or more... (please don't judge).

  • 5000 lines or more in one note markdown file
  • App is in Markdown code view
  • Typing anywhere in the file with the android keyboard

Typing in them has like a one second delay on each keystroke. I'm no expert but is there some very inefficient processing going on? Like, is it going through the entire file each time you change something? Because this delay is cumulative. 5 keystrokes = roughly 5 times the time. I have tested a couple of different markdown editors and while this very issue is certainly not unique, there are other apps that behave normally, which is no delay at all.

If you think this kind of delay is normal or acceptable, I don't know what to tell you. It's a plain text file and there are ways to deal with syntax highlighting efficiently. All that being said, I appreciate developers efforts here, all in all the app works great and gets the job done.

Expected behavior

No response

Notes Android version

33.0.0

Notes server version

33.0.x

Nextcloud Android version

33.0.1

Nextcloud version

33.0.x

Device

Pixel 8

Android Version

16

App Store
  • Google Play Store
  • F-Droid
  • Huawei App Gallery
Stacktrace

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the delay in the Android app's Markdown code view with a note of 5,000 or more lines while typing with the Android keyboard. Start by tracing the code-view editing path and measuring work triggered on each keystroke. Done means typing is responsive for long Markdown notes without the reported cumulative delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.