IndexedDB and localStorage personal test comparison

1. indexedDB executes asynchronously, localStorage executes synchronously.

2. Online said indexedDB does not support ios8 and ios9, there is no real machine test. 

3. The indexedDB and localStorage WeChat terminals clear the cache in the universal, Android machines can be cleaned up, Apple machines can't clean up. 

4. indexedDB Android machine onupneeded takes 6 milliseconds, onsuccess takes 2 milliseconds, Mac machines are 3 milliseconds, there may be some errors.

5. indexedDB objectStore.openCursor (). Onsuccess method is unstable, plus the time to open the database, it takes 3-6 milliseconds for Android and 5-7 milliseconds for Apple phones. 

6. The maximum storage of local storage on WeChat is 5120KB for Android and 2560KB for Mac.

7. indexedDB doesn't know if it's wrong for me to test, only 154KB will not move.

1) The value of the sun object in the peson data table is at most 10KB for Android machines. In this step, it can be seen that the id length cannot exceed 10K
2) 5 million pieces of data are written to the test
The format is {d: count, age: 1, name: 'Teacher Wang (class teacher)', content: 'India China expert Zolaval Dollet Singh said in an exclusive interview with Xinhua News Agency in New Delhi recently The upcoming second informal meeting of leaders of India and China will continue to lead the development of bilateral relations from a strategic and overall perspective. Zolaval said that the informal meeting between Indian and Chinese leaders in Wuhan last year released a very positive signal that the leaders of both countries hope that bilateral relations will develop steadily and inject new impetus into the development of India-China relations. I believe this meeting will continue to push this relationship forward. " In April last year, Chinese and Indian leaders held an informal meeting in Wuhan to comprehensively and in-depth exchange of views on Sino-Indian relations and major international issues of common concern, and reached broad consensus. In order to strengthen cultural exchanges, China and India established a high-level cultural exchange mechanism last year and have held two meetings. As an expert on China issues at the Indian Policy Research Center and a visiting researcher at the India-China Institute, Zolaval believes that this mechanism will help deepen mutual understanding between the peoples of the two countries and further promote cultural exchanges. China is India's largest trading partner, and India is China's largest trading partner in South Asia. Since entering the 21st century, China-India trade volume has increased from less than US $ 3 billion to nearly US $ 100 billion. About 1,000 Chinese companies have continuously increased their investment in the Indian industrial parks, e-commerce and other fields, with a cumulative investment of 8 billion US dollars, creating nearly 200,000 local jobs. Zolaval believes that the two countries have broad space for cooperation and huge potential for development in the economic and trade field. In October last year, the Sino-Indian joint training of Afghan diplomats was officially launched, becoming the first landing project of the "China-India +" cooperation. Zolaval expressed appreciation for the "China-India +" cooperation model proposed by the Indian-Chinese leaders in the Wuhan meeting and believed that the two countries should continue to cooperate with third countries and benefit from joint investment and joint training. The field of mutual benefit and win-win continues to advance. " Zolaval pointed out that at present, the international pattern is undergoing major and profound changes. At the same time, protectionism and unilateralism are on the rise, and the uncertainty and instability facing the world situation have increased. As emerging economies and the two most populous countries, India and China should strengthen communication and coordination in international and regional affairs and play an active role in maintaining regional and world peace and stability. Against this background, it is of great significance for the leaders of the two countries to hold informal meetings again. ', level: count, time2:'

Android machine writes 18896 data, and the number will not change after 18944. I am not sure whether it is the cause of the timer or the reason why it cannot be written. Android version number 5.0.2 Running memory 2G processor 8 core
Android machine writes data 82257 After that, the number will not change, I am not sure whether it is the reason for the timer or the reason for not writing in. Android version number 9 Running memory 6G processor 8 cores
Apple writes data 82257 pieces Apple X 145w pieces


Online resource display:
https://developer.mozilla.org/zh-CN/docs/Web/API/IndexedDB_API/Browser_storage_limits_and_eviction_criteria This document states that the maximum storage space of the browser is dynamic and depends on the hard disk size
https: // www. html5rocks.com/en/tutorials/offline/quota-research/

Guess you like

Origin www.cnblogs.com/vipp/p/12710627.html