OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 declare_args() { | 5 declare_args() { |
6 # Controls whether the build should uses the version of sqlite3 library | 6 # Controls whether the build should uses the version of sqlite3 library |
7 # shipped with the system (currently only supported on iOS) or the one | 7 # shipped with the system (currently only supported on iOS) or the one |
8 # shipped with Chromium source. | 8 # shipped with Chromium source. |
9 use_system_sqlite = is_ios | 9 use_system_sqlite = is_ios |
10 } | 10 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 # TODO(shess): SQLite adds mutexes to protect structures which cross | 60 # TODO(shess): SQLite adds mutexes to protect structures which cross |
61 # threads. In theory Chromium should be able to turn this off for a | 61 # threads. In theory Chromium should be able to turn this off for a |
62 # slight speed boost. | 62 # slight speed boost. |
63 "THREADSAFE", | 63 "THREADSAFE", |
64 | 64 |
65 # SQLite can spawn threads to sort in parallel if configured | 65 # SQLite can spawn threads to sort in parallel if configured |
66 # appropriately. Chromium doesn't configure SQLite for that, and would | 66 # appropriately. Chromium doesn't configure SQLite for that, and would |
67 # prefer to control distribution to worker threads. | 67 # prefer to control distribution to worker threads. |
68 "SQLITE_MAX_WORKER_THREADS=0", | 68 "SQLITE_MAX_WORKER_THREADS=0", |
69 | 69 |
| 70 # Allow 256MB mmap footprint per connection. Should not be too open-ended |
| 71 # as that could cause memory fragmentation. 50MB encompasses the 99th |
| 72 # percentile of Chrome databases in the wild. |
| 73 # TODO(shess): A 64-bit-specific value could be 1G or more. |
| 74 # TODO(shess): Figure out if exceeding this is costly. |
| 75 "SQLITE_MAX_MMAP_SIZE=268435456", |
| 76 |
70 # Use a read-only memory map when mmap'ed I/O is enabled to prevent memory | 77 # Use a read-only memory map when mmap'ed I/O is enabled to prevent memory |
71 # stompers from directly corrupting the database. | 78 # stompers from directly corrupting the database. |
72 # TODO(shess): Upstream the ability to use this define. | 79 # TODO(shess): Upstream the ability to use this define. |
73 "SQLITE_MMAP_READ_ONLY=1", | 80 "SQLITE_MMAP_READ_ONLY=1", |
74 | 81 |
75 # NOTE(shess): Some defines can affect the amalgamation. Those should be | 82 # NOTE(shess): Some defines can affect the amalgamation. Those should be |
76 # added to google_generate_amalgamation.sh, and the amalgamation | 83 # added to google_generate_amalgamation.sh, and the amalgamation |
77 # re-generated. Usually this involves disabling features which include | 84 # re-generated. Usually this involves disabling features which include |
78 # keywords or syntax, for instance SQLITE_OMIT_VIRTUALTABLE omits the | 85 # keywords or syntax, for instance SQLITE_OMIT_VIRTUALTABLE omits the |
79 # virtual table syntax entirely. Missing an item usually results in | 86 # virtual table syntax entirely. Missing an item usually results in |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 "//third_party/icu", | 241 "//third_party/icu", |
235 ] | 242 ] |
236 if (is_clang) { | 243 if (is_clang) { |
237 # src/ext/icu/icu.c uses assert(!"string") which causes warnings about | 244 # src/ext/icu/icu.c uses assert(!"string") which causes warnings about |
238 # conversion from string literal to bool. | 245 # conversion from string literal to bool. |
239 configs -= [ "//build/config/clang:extra_warnings" ] | 246 configs -= [ "//build/config/clang:extra_warnings" ] |
240 } | 247 } |
241 } | 248 } |
242 } | 249 } |
243 } | 250 } |
OLD | NEW |