第一次插入key-value的msync是否可以不执行 #1136
Closed
kaitian521
started this conversation in
Ideas
Replies: 4 comments
-
如果OK我可以提个pr |
Beta Was this translation helpful? Give feedback.
0 replies
-
PR is welcome. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I tested it and it seems perfect |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The language of MMKV
JAVA
The version of MMKV
1.3.0
The platform of MMKV
Android
The installation of MMKV
Maven
What's the issue?
发现部分ANR,产生原因是,MMKV刚创建后,第一次插入一个key,很小的key和value,加起来不到50个字节。然后m_dic为空,此时会走到
expandAndWriteBack
、doFullWriteBack
、sync(MMKV_SYNC);
导致卡顿这种情况,文件为空(m_actualsize == 0)时,这个msync是否可以不执行?
Beta Was this translation helpful? Give feedback.
All reactions