summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public
diff options
context:
space:
mode:
authordigit@chromium.org <digit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-04 20:47:31 +0000
committerdigit@chromium.org <digit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-04 20:47:31 +0000
commit35e10e96455d71f04bf4756872290cc3563e74e7 (patch)
treeab193b980339d925004e0451e40616f960931285 /sync/internal_api/public
parent38387cfecc9027d8c1ac0fcc24c874573e36939f (diff)
downloadchromium_src-35e10e96455d71f04bf4756872290cc3563e74e7.zip
chromium_src-35e10e96455d71f04bf4756872290cc3563e74e7.tar.gz
chromium_src-35e10e96455d71f04bf4756872290cc3563e74e7.tar.bz2
Minor SimpleCacheBackend improvements.
- Use a base::hash_map instead of a std::map for the SimpleBackendImpl::EntryMap type, to reduce heap usage. This saves 3 pointers/node on Android, since there is no need for an ordered map here. - Avoid creating a new closure on every call to SimpleIndex::PostponeWritingToDisk. Each base::Bind() call creates a new heap-allocated reference-counted object. Given that this function is called for every mutating operation on the index, it's a good idea to get rid of it. Since the called function and its argument never change, create the closure only once and reuse it on every write_to_disk_timer_.Start() call. - Avoid performing one extra lookup and one extra call to PostponeWritingToDisk() in SimpleIndex::Remove(). - Remove un-necessary temporary string creations and a tiny typo. R=felipeg@chromium.org, gavinp@chromium.org, pasko@chromium.org, pliard@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/14877019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204035 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public')
0 files changed, 0 insertions, 0 deletions