浅谈localStorage的性能

2025-02-23 22:00:04
推荐回答(1个)
回答1:

中文存储不简单

localStorage, perhaps not so harmful

PSA: DOM localStorage considered harmful

CateDta存储的是一个类目数组 文件大小在1M左右, 数组长度为40

在谷歌上面 测试了十组结果 得出结果:

在谷歌上面 测试了十组结果 计算平均值:

以500 为标准的时候 在谷歌上面 测试了十组结果 得出

得出读取速度 分批次的时候 平均读取速度是7.9ms 整体存入的平均速度 16.6ms

在谷歌上面 测试了十组结果:
分别存入 存入5次 平均值是47.6ms 整体存入 存入5次的话 37.5ms

https://www.cnblogs.com/shinnyChen/p/3779782.html

https://www.jianshu.com/p/a47baf68addb

localStorage读取性能

HTML5新特性之localStorage的使用技巧,不看看你可能真的不知道