Open Yuki001 opened 4 months ago
In my project, I have modified the cacheManager to clear 1/3 when found the cache file count is larger than a threshold (2048) on game init, The modify makes my game run better. but it's not the correct solution and is only a patch. The correct solution is make cache database fast for insert and save.
Can use sqlite in wechat?
May be some other methods can be used for wechat instead of direct use sqlite library
Use Case
Use game cache in wechat game. The game project has a lot asset files to cache
Problem Description
When cached files count has a lot (>2000 or above),if the cache insert a file, the database will update in 2 seconds. But the json database (cacheList.json) serializing and writing is very slow , makes the game junk at every write time.
Proposed Solution
Use a database file format for asset cache instead of json file, not serialize all the data for a update. Maybe a sqlite or something else format which is fast for insert and save.
How it works
No response
Alternatives Considered
Maybe a sqlite or something else format which is fast for insert and save.
Additional Information
No response