]> granicus.if.org Git - esp-idf/commit
nvs: remove search cache at page level
authorIvan Grokhotkov <ivan@espressif.com>
Fri, 12 May 2017 04:18:08 +0000 (12:18 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Fri, 12 May 2017 04:18:08 +0000 (12:18 +0800)
commitbf01525fc154594d3b5eb7f57bfd83c9daf1359d
treec9f157e44b08d9da600469776009a446d50c475b
parent15a61459610d6ead47d0a940bba65215c37a541d
nvs: remove search cache at page level

Since read cache was introduced at page level, search cache became
useless in terms of reducing the number of flash read operations.
In addition to that, search cache used an assumption that if pointers to
keys are identical, the keys are also identical, which was proven wrong
by applications which generate key names dynamically.

This change removes CachedFindInfo, and all its uses. This is done at
expense of a small extra number of CPU operations (looking up a value in
the read cache is slightly more expensive) but no extra flash read
operations.

Ref TW12505
Ref https://github.com/espressif/arduino-esp32/issues/365
components/nvs_flash/src/nvs_page.cpp
components/nvs_flash/src/nvs_page.hpp
components/nvs_flash/test_nvs_host/test_nvs.cpp