summaryrefslogtreecommitdiff
path: root/platform/default/mbgl
Commit message (Collapse)AuthorAgeFilesLines
...
* [core] Enforce foreign key constraints in the offline databaseJohn Firebaugh2016-02-244-14/+16
|
* [core] Fix subtle bug in OfflineDatabase with updated resourcesJohn Firebaugh2016-02-242-74/+154
| | | | | | SQLite REPLACE is *not* UPSERT. If a conflict occurs, it first deletes the existing row, then inserts a new row. This means that AUTOINCREMENT primary keys change. This will break foreign keys to that value, which we use. Instead we must try an UPDATE, and fall back to an INSERT if the UPDATE changes zero rows.
* [core] status.requiredResourceCountIsIndeterminate ⇢ ↵John Firebaugh2016-02-241-5/+5
| | | | | | status.requiredResourceCountIsPrecise Change the name and reverse the sense. Naming things in the positive is better than naming them in the negative.
* [tests] Fix buildJohn Firebaugh2016-02-111-1/+1
|
* Allow using tileSize: 512 as a switch to trade retina support for 512px ↵Young Hahn2016-02-111-2/+2
| | | | raster tiles
* [core] return std::move() prevents copy elisionKonstantin Käfer2016-02-111-1/+1
|
* [core] Always store tiles without ratio support with ratio = 1John Firebaugh2016-02-102-3/+3
|
* [core] Eliminate tilesets tableJohn Firebaugh2016-02-103-88/+65
| | | | This results in a ~1% increase in database size, which is worth it for reducing complexity and making the tiles and resources tables more similar in structure.
* [core] Optimize offline database schemaJohn Firebaugh2016-02-103-73/+84
| | | | | * Under the hood, SQLite creates surrogate keys (ROWID) anyway. We may as well take advantage of this and use the surrogates for foreign keys as well, since they are simpler and more efficient than compound foreign keys. * Create indexes for efficient eviction queries
* [core] Retry errors encountered during offline downloadsJohn Firebaugh2016-02-101-2/+2
|
* [core] Eliminate maximumCacheEntrySizeJohn Firebaugh2016-02-102-64/+54
| | | | Instead, the eviction policy accounts for the actual size needed for an incoming put.
* [core] Implement an eviction policy for OfflineDatabaseJohn Firebaugh2016-02-102-25/+128
| | | | | | | | | | | | | When inserting an cached resource, or removing a region, remove least-recently used resources and tiles, not used by offline regions, until the used database size, as calculated by multiplying the number of in-use pages by the page size, is less than the maximum cache size minus 5 times the page size. In addition, OfflineDatabase may be configured to ignore cache puts of individual resources larger than a certain size. This policy is similar but not identical to the former SQLiteCache policy: * It accounts for offline, by exempting resources required by offline regions from eviction. * It must delete from two tables (resources and tiles), rather than one. Currently the strategy is naive: evict 50 rows at a time from each table. * It makes maximumCacheSize and maximumCacheEntrySize completely independent. The SQLiteCache implementation evicted when `usedSize > maximumCacheSize - 2 * maximumCacheEntrySize`. This evicts when `usedSize > maximumCacheSize - 5 * pageSize`. * It uses a non-unlimited default value for maximumCacheSize: 50 MB. We should have always had a limit in place; "a cache without an eviction policy is a resource leak".
* [core] Reset SQLite statements after use in order to release locksJohn Firebaugh2016-02-102-112/+130
|
* [core] Disable SQLite busy timeouts so that multiple readers can access the ↵John Firebaugh2016-02-101-0/+5
| | | | same database
* [core] Interface and implementation for offlineJohn Firebaugh2016-02-105-13/+606
|
* [all] Don't interpret 404s on non-tile resources as "no content"John Firebaugh2016-02-101-6/+6
|
* [core] Reimplement existing caching within an offline-capable database schemaJohn Firebaugh2016-02-105-0/+484