Tencent / MMKV

An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.
Other
17.1k stars 1.88k forks source link

鸿蒙Next MMKV 解析Boolean的时候比较耗时,差的时候要1ms #1324

Closed xinle closed 1 week ago

xinle commented 1 month ago

Note:

An crash issue will be ignored & closed in a week without logs.

The language of MMKV

e.g. Objective-C, Swift, Java, or Kotlin

The version of MMKV

e.g. v1.2.2
Note: For versions older than the latest version, please upgrade before posting any issue.
We don't have much time for old version tech support.

The platform of MMKV

e.g. iOS or Android

The installation of MMKV

e.g. Cocoapods, Maven, or Git clone

What's the issue?

Post the outputs or screenshots for errors.

Explain what you want by example or code in English. If you have a crash/OOM/ANR on Android, please provide symbolize stack traces. https://developer.android.com/ndk/guides/ndk-stack.html

What's the log of MMKV when that happened?

Your detail logs. As much as possible. For how to forward MMKV's log, you can checkout the wiki on each platform. An crash issue will be ignored & closed in a week without logs.

lingol commented 1 month ago

It's quite impossible. What is the log when it happens? Is it doing a loading/reload from file?

lingol commented 1 month ago

If possible you should provide a reproducible demo.

xinle commented 1 month ago

辛苦看下这个是trace抓到的数据 ![Uploading 20240614141902.jpg…]()

xinle commented 1 month ago

https://imagev2.xmcdn.com/storages/34b6-audiofreehighqps/AC/FC/GArMcTAKQaRhAAOQcwLhgy5j.jpg 这个是trace的数据

lingol commented 4 weeks ago

https://imagev2.xmcdn.com/storages/34b6-audiofreehighqps/AC/FC/GArMcTAKQaRhAAOQcwLhgy5j.jpg 这个是trace的数据

  1. That has little info if not any. According to this, the NAPI only costs 300+us, and the majority cost is inside ArtTS wrapper, I can only assume the ArtTS sucks because it's a fairly straightforward wrapper. https://github.com/Tencent/MMKV/blob/master/OpenHarmony/MMKV/src/main/ets/utils/MMKV.ets#L168

辛苦看下这个是trace抓到的数据 ![Uploading 20240614141902.jpg…]()

  1. That image is broken.
  2. One more thing, why is your MMKV wrapper named MMKV.ts? Last time I checked, the official MMKV is provided as MMKV.ets. Is it possible that you were using an unofficial port of MMKV such as @ohos/mmkv? The official port is named @tencent/mmkv.
SunryOne commented 2 weeks ago

hello,1.3.5版本 请问你们是如何在鸿蒙UIAbility 里面进行引入的呢。 不应该会报Importing ArkTS files to JS and TS files is not allowed. 的错误吗

lingol commented 2 weeks ago

hello,1.3.5版本 请问你们是如何在鸿蒙UIAbility 里面进行引入的呢。 不应该会报Importing ArkTS files to JS and TS files is not allowed. 的错误吗

Don't make unrelative questions, if you have an issue open a new one.

lingol commented 1 week ago

Closed due to lack of information & inactive.