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

Slowed typing after reaching 500kb in file size #1743

Closed
3 tasks done
zeplar-exe opened this issue Jun 24, 2022 · 19 comments · Fixed by #1757
Closed
3 tasks done

Slowed typing after reaching 500kb in file size #1743

zeplar-exe opened this issue Jun 24, 2022 · 19 comments · Fixed by #1757

Comments

@zeplar-exe
Copy link

zeplar-exe commented Jun 24, 2022

⚠️ This issue respects the following points: ⚠️

  • This is a bug. Not a question or feature request.
  • The issue is not already reported at Issues or discussions. (I've searched it).
  • Markor is up to date. See Releases for the latest version. Updates are available from F-Droid and GitHub.

Description

When trying to edit one of my larger markdown files (500kb), typing suddenly slows to a halt. There is no gradual decrease in performance as the file gets larger.
Typing a single character takes up to 7 seconds, and general responsiveness is halted. Key presses can also be built up and not have a delylay themselves.

Steps to reproduce

  1. Create a file
  2. Enter ~500kb of text
  3. Observe painfully slow typing speed

Information

Android version: 12 (seen on Android 11 as well)
Device: Galaxy A13
App Version: 2.9.0

Source

APK

Format / File type

Markdown

Additional info / Log

- This only happens in markor
- This can be observed with any keyboard (Samsung keyboard, external keyboards)
- Other functionality is not affected
@gsantner
Copy link
Owner

gsantner commented Jun 24, 2022 via email

@zeplar-exe
Copy link
Author

zeplar-exe commented Jun 25, 2022

Update to 2.9.0.

Already updated to 2.9.0, forgot to edit that. The problem still occurs, and the delay is somewhat longer.

@harshad1
Copy link
Collaborator

harshad1 commented Jun 26, 2022

Turn off highlighting for the file. 3 dot menu -> file settings

@zeplar-exe
Copy link
Author

zeplar-exe commented Jun 26, 2022

I don't have highlighting enabled. @harshad1.

Enabling and disabling it doesn't change anything either.

@harshad1
Copy link
Collaborator

Try disabling all accessibility related things in settings on your phone? This was addressed some time ago, but maybe there is something I missed?

I am not able to reproduce this on my phone (pixel 3 xl)

@zeplar-exe
Copy link
Author

No changes. @harshad1

@harshad1
Copy link
Collaborator

Try turning auto-formatting off as well? (Right next to highlighting)

@zeplar-exe
Copy link
Author

No changes. Disabling wrap words doesn't change anything either. @harshad1

@CtrlAltCuteness
Copy link

Likely the issue lies around the fact that the device's RAM is getting overwhelmed by Markor having this large file in memory as well as other various background apps loading and unloading in memory.
If something existed similar to vim's swap files for Markor, this might lower the issues that you are experiencing there.

By the way, is it possible for you to state how much storage space you have left on your device? Android is somehow known to be very slow if the remaining storage space gets low.

If there is plenty of space left, you can just reply with the amount of storage space used / remaining and how much storage space you got in total, optionally continue reading for a few tips.
Otherwise, if it is relatively low, write it down so you can reference it in a new reply after we update the Media Database.

Back up some of your stuff to a computer / etc. before removing it to free up enough room for the file manager app Fx File Explorer - Google Play Store (note: the unlock key called Fx Plus will not be needed for this task).
Some apps don't properly update the Media Database when they read or write files. If this is the case, you might have a bunch of thumbnails existing for files / videos / etc. you have deleted long ago.

Swipe all apps off the recent apps list (save everything first if you want to keep them), copy a single space (kinda important), and if you have a clipboard with history, make sure to completely clear that out.

  1. Start up Fx and, if this is your first time running it, go through the basic setup and tutorial it has.
  2. Go into Settings on the left pane (if that pane is not showing, it will be in the triple line menu in the top left).
  3. In the Files and Media category, go into Thumbnails.
  4. Uncheck Thumbnails at the top and tap back until you get back to the Home.
  5. Go into your Main Storage (or the primary SDCard if you don't have a Main Storage).
  6. Make sure you are at the root of this storage and not any subdirectory ("folder") inside of it,
  7. In the top right triple dot menu, at or near the bottom is Rescan Media.
  8. Let it run, which may take some time depending on how much you have on there as well as how many entries are not in the Media Database or are there but the file no longer exists.

Now exit Fx (you may uninstall Fx if you want to now) and reopen the same storage thing you used before. Reply back the amount you had before and after (as well as if Fx is still installed).

Aside: I'm not trying to advertise this app. It is just the easiest way that I know of to do this task quickly and painlessly.

@CtrlAltCuteness
Copy link

Sorry for the extra reply. This is mainly intended for @zeplar-exe but it also will be helpful for @harshad1 to know the results.

@zeplar-exe
Copy link
Author

@CtrlAltCuteness 48/64 GB used. Surely more than enough.

I tested my RAM. With no other apps open besides settings and my file in markor, I'm at 1.4/3 GB of memory available.

@harshad1
Copy link
Collaborator

harshad1 commented Jul 14, 2022 via email

@gsantner
Copy link
Owner

I released Markor v2.10.0 today, I know it has lots of performance improvements, so might help here as well. See #1760.

Generally speaking, there are by feeling really many performance X is slow Y takes long topics already open in the bugtracker. Closing this one as duplicate, I know you want it to work better, everybody does, but writing (or writing again) descriptions doesn't improve it for sure 😄 . This topic of "~1MB+ file loading slow" has been coming up as long the project exists.

Currently we talk here what we can do.

@gsantner gsantner reopened this Jul 16, 2022
@zeplar-exe
Copy link
Author

The loading itself isn't even that slow though. I couldn't find any issues that describe poor keyboard performance.

@gsantner
Copy link
Owner

gsantner commented Jul 16, 2022

Possible that you have much in your clipboard? I sometimes have i.e. a whole File base64 encoded in the clipboard .... and then when I open Firefox on Android it crashes ... because the browser has a option "open link from clipboard", which reads this out and makes issues. Maybe your keyboard has such a feature and have a filled clipboard too?

@zeplar-exe
Copy link
Author

No changes with a cleared clipboard, unless SwiftKey is hiding things from me. I updated to 2.10 too.

@zeplar-exe
Copy link
Author

zeplar-exe commented Jul 16, 2022

Turns out the default keyboard was storing copied text. I cleared that and had good performance for about 5 seconds. Not sure what to think.

@gsantner gsantner closed this as completed Aug 6, 2022
@zeplar-exe
Copy link
Author

Not really completed though. The problem persists after typing a word or two.

@gsantner gsantner linked a pull request Aug 16, 2022 that will close this issue
4 tasks
@Addisonbean
Copy link

Addisonbean commented Jan 1, 2024

@zeplar-exe Have you found a fix for this? I'm having the same issue using the latest version (2.11.0) on a file that's just over 500kb. I also have syntax highlighting off for the file too.

Edit: I tried installing a few more keyboards, and Gboard is the only one so far that works flawlessly... I guess I'll be using that for now. (SwiftKey and the Samsung one both were unusable with this file in Markor).

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 a pull request may close this issue.

5 participants