OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'use_system_sqlite%': 0, | 7 'use_system_sqlite%': 0, |
8 'required_sqlite_version': '3.6.1', | 8 'required_sqlite_version': '3.6.1', |
9 }, | 9 }, |
10 'target_defaults': { | 10 'target_defaults': { |
(...skipping 10 matching lines...) Expand all Loading... |
21 # TODO(shess): This shouldn't use faux-SQLite naming. | 21 # TODO(shess): This shouldn't use faux-SQLite naming. |
22 'SQLITE_SEPARATE_CACHE_POOLS', | 22 'SQLITE_SEPARATE_CACHE_POOLS', |
23 # TODO(shess): SQLite adds mutexes to protect structures which cross | 23 # TODO(shess): SQLite adds mutexes to protect structures which cross |
24 # threads. In theory Chromium should be able to turn this off for a | 24 # threads. In theory Chromium should be able to turn this off for a |
25 # slight speed boost. | 25 # slight speed boost. |
26 'THREADSAFE', | 26 'THREADSAFE', |
27 # SQLite can spawn threads to sort in parallel if configured | 27 # SQLite can spawn threads to sort in parallel if configured |
28 # appropriately. Chromium doesn't configure SQLite for that, and would | 28 # appropriately. Chromium doesn't configure SQLite for that, and would |
29 # prefer to control distribution to worker threads. | 29 # prefer to control distribution to worker threads. |
30 'SQLITE_MAX_WORKER_THREADS=0', | 30 'SQLITE_MAX_WORKER_THREADS=0', |
| 31 # Allow 256MB mmap footprint per connection. Should not be too open-ended |
| 32 # as that could cause memory fragmentation. 50MB encompasses the 99th |
| 33 # percentile of Chrome databases in the wild. |
| 34 # TODO(shess): A 64-bit-specific value could be 1G or more. |
| 35 # TODO(shess): Figure out if exceeding this is costly. |
| 36 'SQLITE_MAX_MMAP_SIZE=268435456', |
31 # Use a read-only memory map when mmap'ed I/O is enabled to prevent memory | 37 # Use a read-only memory map when mmap'ed I/O is enabled to prevent memory |
32 # stompers from directly corrupting the database. | 38 # stompers from directly corrupting the database. |
33 # TODO(shess): Upstream the ability to use this define. | 39 # TODO(shess): Upstream the ability to use this define. |
34 'SQLITE_MMAP_READ_ONLY=1', | 40 'SQLITE_MMAP_READ_ONLY=1', |
35 # NOTE(shess): Some defines can affect the amalgamation. Those should be | 41 # NOTE(shess): Some defines can affect the amalgamation. Those should be |
36 # added to google_generate_amalgamation.sh, and the amalgamation | 42 # added to google_generate_amalgamation.sh, and the amalgamation |
37 # re-generated. Usually this involves disabling features which include | 43 # re-generated. Usually this involves disabling features which include |
38 # keywords or syntax, for instance SQLITE_OMIT_VIRTUALTABLE omits the | 44 # keywords or syntax, for instance SQLITE_OMIT_VIRTUALTABLE omits the |
39 # virtual table syntax entirely. Missing an item usually results in | 45 # virtual table syntax entirely. Missing an item usually results in |
40 # syntax working but execution failing. Review: | 46 # syntax working but execution failing. Review: |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 'SQLITE_CORE', | 249 'SQLITE_CORE', |
244 ], | 250 ], |
245 'sources': [ | 251 'sources': [ |
246 'src/ext/icu/icu.c', | 252 'src/ext/icu/icu.c', |
247 ], | 253 ], |
248 }, | 254 }, |
249 ], | 255 ], |
250 }], | 256 }], |
251 ], | 257 ], |
252 } | 258 } |
OLD | NEW |