Skip to content

[BUG] Editor lag and scroll freezing on mobile with long logs (IME/CJK input related) #32

@Snifer

Description

@Snifer

Description

Screen scrolling freezes on mobile devices when Lonelog entries become lengthy. The issue is caused by expensive editor highlighting rebuilds during text composition, particularly affecting IME-based input systems (Chinese, Japanese, Korean keyboards). Performance degrades progressively as the document grows.

Steps to Reproduce

  1. Create a new note with Lonelog tags ([N:...], [PC:...], [Thread:...], etc.)
  2. Add multiple log entries over time until the document becomes lengthy
  3. Attempt to scroll through the note on a mobile device (particularly Android)
  4. Try editing or adding new Lonelog tags with IME keyboard input

Expected Behavior

  • Smooth scrolling throughout the note regardless of log length
  • Responsive editor when typing with IME keyboards
  • No performance degradation as document size increases

Actual Behavior

  • Scrolling becomes frozen/unresponsive as the document grows
  • Editor exhibits noticeable lag during IME text composition
  • Performance degrades significantly in large notes with multiple Lonelog entries
  • Mobile devices particularly affected (see video evidence in Twitter thread)

Environment

  • OS: Android 16 (Samsung Galaxy S23 Ultra)
  • Obsidian version: Mobile
  • lonelog version: Current version
  • Additional: Community theme enabled

Additional Context

Reported by: Twitter user @mi_na_acnh
Original report: https://x.com/mi_na_acnh/status/2060302788199071908
Video evidence: Included in the tweet thread

Root Cause Analysis

The performance issue stems from:

  • Expensive editor highlighting rebuilds triggered during CodeMirror text composition mode
  • Autocomplete reparsing the full document during IME composition
  • Full Lonelog parse happening on every query update instead of once per autocomplete session

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions