* Manual Xcode project fixups
* Remove `firebase/firestore` from paths in Firestore/core
This renames all Firestore files under `Firestore/core` to remove the
interior `firebase/firestore` directory structure. This is motivated by
build failures under Windows where the filenames of intermediates were
too long.
Concretely:
* `Firebase/core/src/firebase/firestore` becomes `Firebase/core/src`
* `Firebase/core/test/firebase/firestore` becomes
`Firebase/core/test/unit`
Moving the tests into a `unit` subdirectory aligns Firestore with the
directory structure in
[AddNewPod](https://github.com/firebase/firebase-ios-sdk/blob/master/AddNewPod.md),
modified for C++ (see discussion in #3224).
* Fix previously unknown warnings
These become visible once flags are handled uniformly across all
Firestore targets in an upcoming build change.
* Stop using built-in CMake Framework support
CMake has built-in support for building Framework bundles (briefly:
bundles of libraries, associated headers, and resources) but this
doesn't work well for our needs.
1. In CMake 3.5.1 (our earliest supported CMake version) it doesn't copy
headers properly at build time.
2. Even up to CMake 3.15.5, CMake doesn't handle link-line multiplicity
correctly. CMake passes the static library location within the framework
and this seems to cause the linker to mishandle Objective-C metaclass
information resulting in duplicate symbols. Building with `-framework`
flags works correctly.
Previously we partially worked around the latter problem by building
some frameworks as shared instead of static frameworks, but this is
problematic because this mode of operation isn't actually intended and
is unsupported as far as the rest of Firebase is concerned. This turned
out to be fragile though and while refactoring libraries this workaround
broke.
Rather than piling on additional workarounds, this change converts the
frameworks to simple library targets and emulates framework imports
through include paths.
Additionally, this starts refactoring our cmake helper functions to make
them more like built-in functions. This makes it possible to freely use
different CMake features that were made difficult by trying to wrap
everything up in a single CMake command.
* style.sh generated changes
* Review feedback
* More review feedback
* Add Index-free benchmarks
* Add BackgroundQueue
Port of firebase/firebase-android-sdk#559
* Decode documents in background threads to improve performance
Run on (12 X 2900 MHz CPU s)
CPU Caches:
L1 Data 32K (x6)
L1 Instruction 32K (x6)
L2 Unified 262K (x6)
L3 Unified 12582K (x1)
Load Average: 2.24, 2.18, 1.96
----------------------------------------------------------------------------------
Benchmark Time CPU Iterations Improvement
----------------------------------------------------------------------------------
BM_QueryMatching/0/1 132 us 12.7 us 53524 21.4%
BM_QueryMatching/1/1 150 us 18.1 us 37305 16.2%
BM_QueryMatching/1/10 371 us 27.6 us 10000 48.5%
BM_QueryMatching/10/10 429 us 64.3 us 11349 41.0%
BM_QueryMatching/1/100 2573 us 29.0 us 1000 51.7% (max)
BM_QueryMatching/100/100 3123 us 416 us 1000 45.5%
BM_QueryMatching/1/1000 26785 us 33.5 us 100 50.5%
BM_QueryMatching/10/1000 28389 us 74.5 us 100 48.0%
BM_QueryMatching/100/1000 27883 us 470 us 100 49.4%
BM_QueryMatching/1000/1000 32189 us 34.3 us 100 44.8%
BM_QueryAll/1 151 us 15.2 us 45385 -49.5% (min)
BM_QueryAll/10 444 us 60.7 us 12829 32.5%
BM_QueryAll/100 3175 us 414 us 1000 45.1%
BM_QueryAll/1000 30222 us 18.8 us 100 49.7%
Mean 35.3%
* Insert into a vector to reduce contention
Run on (12 X 2900 MHz CPU s)
CPU Caches:
L1 Data 32K (x6)
L1 Instruction 32K (x6)
L2 Unified 262K (x6)
L3 Unified 12582K (x1)
Load Average: 1.43, 2.10, 1.98
----------------------------------------------------------------------------------
Benchmark Time CPU Iterations Improvement
----------------------------------------------------------------------------------
BM_QueryMatching/0/1 127 us 12.2 us 56131 3.8%
BM_QueryMatching/1/1 142 us 16.6 us 39200 5.3%
BM_QueryMatching/1/10 369 us 26.6 us 10000 0.5%
BM_QueryMatching/10/10 425 us 59.2 us 12724 0.9%
BM_QueryMatching/1/100 2194 us 28.9 us 10000 14.7%
BM_QueryMatching/100/100 2765 us 405 us 1000 11.5%
BM_QueryMatching/1/1000 21095 us 32.8 us 1000 21.2%
BM_QueryMatching/10/1000 20797 us 66.4 us 1000 26.7% (max)
BM_QueryMatching/100/1000 21915 us 408 us 1000 21.4%
BM_QueryMatching/1000/1000 23700 us 30.9 us 1000 26.4%
BM_QueryAll/1 136 us 14.3 us 44799 9.9%
BM_QueryAll/10 443 us 57.3 us 10000 0.2% (min)
BM_QueryAll/100 2607 us 389 us 1000 17.9%
BM_QueryAll/1000 23512 us 19.4 us 1000 22.2%
Mean 13.1%