Skip to content

用的手机app播放视频闪退,数据量大就这样 #78

Backlog

Description

@xuwu886

安卓app。安卓16
转存了70多万数据,打开文件夹里面视频观看,播放一开始流畅后面卡顿+闪退,ai说是
现象

  1. 冷启动后 4–6 秒内 Java 堆从 8MB 冲到 418–490MB
  2. 播放云端视频时堆涨到 511/512MB,全线程连环 OOM:
    java.lang.OutOfMemoryError: Failed to allocate a 48 byte allocation
    with 177856 free bytes ... giving up on allocation because <1% of heap free after GC
    崩溃线程涉及 DefaultDispatcher-worker、binder、sq5 TaskRunner、kotlinx.coroutines.DefaultExecutor
  3. 应用自身日志:
    W VaultOpsSync: Vault-ops sync cycle failed: OutOfMemoryError
    W Memory: Memory pressure transitioned: Constrained -> Critical (heap=511/512 MiB, 99%)
    版本:Piko 1.7.0 (1007000), minSdk 26, targetSdk 37
    规模:vault_nodes 783,470 行(757,333 FILE + 26,137 FOLDER)
    Java 堆上限:512 MB(largeHeap)

有办法改不?ai建议是
建议

  1. vault 快照改为按 parent_ref 懒加载,只驻留当前目录 + 一级邻域
  2. 离开目录时按 LRU 淘汰,设上限(例如 5 万节点)
  3. 启动时不要预加载全量 vault;VaultOpsSync 改为增量 + 分页
  4. vault_batches 增加自动压缩:materialized=1 且 synced=1 后清空 ops_json
    (实测可清掉 272MB 中的 269MB,纯冗余)

Activity

  1. xuwu886 commented on Dec 4, 2026

    @xuwu886
    Author

    麻烦作者康康嘿嘿😁,作者有更好的办法那更好了~

  2. NihilDigit commented on Dec 4, 2026

    @NihilDigit
    Owner

    这个问题我发现了,我在重新设计底层机制来确保大文件不会卡死,但需要等我一阵子,这部分工作比较复杂

  3. xuwu886 commented on Dec 4, 2026

    @xuwu886
    Author

    这个问题我发现了,我在重新设计底层机制来确保大文件不会卡死,但需要等我一阵子,这部分工作比较复杂

    麻烦了~灰常感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions