plugins
plugins copied to clipboard
feat: mmkv
Two versions of mmkv
MMKV is an efficient, small, easy-to-use mobile key-value storage framework used in the WeChat application
- mmkv uses gradle & cocoapods for the dependencies
- mmkv uses the cocoapods dependency for ios but on android an undocumented runtime feature which can be found here .
For mmkv-metal to work we will need this pr
The following are some sample call times for both versions
| Action/Method Name | Package | time |
|---|---|---|
| Constructor | Regular | 0.515ms |
| Constructor | Metal | 0.056ms |
| contains | Regular | 0.071ms |
| contains | Metal | 0.006ms |
| set | Regular | 1.879ms |
| set | Metal | 0.765ms |
| getString | Regular | 0.148ms |
| getString | Metal | 0.009ms |
Metal Version
| Pros β | Cons :x: |
|---|---|
| Faster ποΈ π¨ | Will need to dive into to c++ π€·π½ |
| Less Gc Calls | Has to be built against runtime compatible v8 version ... so if the runtime upgrade you need to rebuild πΊπ½ |
| Increased lib size π’ (could link against the rt vs libv8 π ) |
I also included a nice localStorage shim around both plugins
Any chance this can be merged ... without a blog post? :)