Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hooking Up Incremental Read
Summary: Adding `readRelayDiskCache`, which uses the recently added `findRelayQueryLeaves` to figure which nodes we need to read out from disk cache. It's essentially a BFT of the queries nodes and reading nodes out from disk recursively as they are needed. `readRelayDiskCache` will keep track of pending node reads and pending rootcalls. The pending maps ensure we don't waste time trying to read the same node from cache multiple times. I also added a bunch of `hasFailed` to ensure we short circuit as fast as possible if we realized we are missing data to avoid doing extra work. Reviewed By: josephsavona Differential Revision: D2548754 fb-gh-sync-id: 75d30bf4331dcf217b8396357dcdf39257b8b8e9
- Loading branch information
Showing with 932 additions and 10 deletions.
- +18 −3 src/legacy/store/GraphQLQueryRunner.js
- +19 −5 src/legacy/store/__tests__/GraphQLQueryRunner-test.js
- +31 −1 src/store/RelayStoreData.js
- +14 −0 src/store/__mocks__/readRelayDiskCache.js
- +580 −0 src/store/__tests__/readRelayDiskCache-test.js
- +256 −0 src/store/readRelayDiskCache.js
- +14 −0 src/tools/RelayTypes.js
- +0 −1 src/traversal/findRelayQueryLeaves.js
|@@ -0,0 +1,14 @@|
|* Copyright 2013-2015, Facebook, Inc.|
|* All rights reserved.|
|* This source code is licensed under the BSD-style license found in the|
|* LICENSE file in the root directory of this source tree. An additional grant|
|* of patent rights can be found in the PATENTS file in the same directory.|
|module.exports = jest.genMockFunction().mockImplementation(|
Oops, something went wrong.