-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to synchronous GraphQL execution and data loading #1531
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
25e3f06
Fix building performance tests for simulator
martijnwalraven 0f9a660
Convert to synchronous GraphQL execution and data loading
martijnwalraven f15e2a5
Remove now unnecessary read/write lock from ApolloStore
martijnwalraven e1a7c85
Add lock to GraphQLQueryWatcher to avoid race conditions
martijnwalraven 31c7e24
Make `DataLoader.load` private
martijnwalraven 5bcff6a
Avoid nested `map` in `GraphQLExecutor`
martijnwalraven 6110231
Document PossiblyDeferred and add tests
martijnwalraven 78f84e5
Add comment about `ReferenceResolver` to `GraphQLExecutor`
martijnwalraven cc70b29
Add completion handler to ApolloStore.publish
martijnwalraven 9b3d7ed
Assert on unhandled failures in returnResultAsyncIfNeeded
martijnwalraven 5cfc96d
Delegate ApolloStore.load(query:) completion to `withinReadTransaction`
martijnwalraven 2c0341d
Import Foundation instead of Dispatch
martijnwalraven 4c8a3e2
Make single liner more readable
martijnwalraven 0b42988
Make DataLoaderTests more readable
martijnwalraven dd0f6c7
Mention reference resolver in GraphQLExecutor init comments
martijnwalraven 968e404
Avoid one liner in GraphQLExecutor
martijnwalraven 0a5c527
Replace direct lock use with Atomic wrappers in GraphQLQueryWatcher
martijnwalraven 56bc70c
Avoid one-liner
martijnwalraven 256a4bc
Guard ApolloCore import when using CocoaPods
martijnwalraven 9803e27
Merge branch 'main' into synchronous-execution
martijnwalraven File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...cbaselines/9F54C8B3255D760B0065AFD6.xcbaseline/7A4A2454-7A24-425D-84C2-116320B87F1E.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>classNames</key> | ||
<dict> | ||
<key>ParsingPerformanceTests</key> | ||
<dict> | ||
<key>testParseResult()</key> | ||
<dict> | ||
<key>com.apple.XCTPerformanceMetric_WallClockTime</key> | ||
<dict> | ||
<key>baselineAverage</key> | ||
<real>0.075663</real> | ||
<key>baselineIntegrationDisplayName</key> | ||
<string>17 Nov 2020 at 14:11:59</string> | ||
</dict> | ||
</dict> | ||
<key>testParseResultFast()</key> | ||
<dict> | ||
<key>com.apple.XCTPerformanceMetric_WallClockTime</key> | ||
<dict> | ||
<key>baselineAverage</key> | ||
<real>0.016628</real> | ||
<key>baselineIntegrationDisplayName</key> | ||
<string>17 Nov 2020 at 14:11:59</string> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
32 changes: 32 additions & 0 deletions
32
...cbaselines/9F54C8B3255D760B0065AFD6.xcbaseline/FA3A7E89-3F08-4E7F-890A-B0903F68A94C.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>classNames</key> | ||
<dict> | ||
<key>ParsingPerformanceTests</key> | ||
<dict> | ||
<key>testParseResult()</key> | ||
<dict> | ||
<key>com.apple.XCTPerformanceMetric_WallClockTime</key> | ||
<dict> | ||
<key>baselineAverage</key> | ||
<real>0.09509</real> | ||
<key>baselineIntegrationDisplayName</key> | ||
<string>17 Nov 2020 at 13:47:48</string> | ||
</dict> | ||
</dict> | ||
<key>testParseResultFast()</key> | ||
<dict> | ||
<key>com.apple.XCTPerformanceMetric_WallClockTime</key> | ||
<dict> | ||
<key>baselineAverage</key> | ||
<real>0.017559</real> | ||
<key>baselineIntegrationDisplayName</key> | ||
<string>17 Nov 2020 at 13:47:48</string> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
64 changes: 64 additions & 0 deletions
64
Apollo.xcodeproj/xcshareddata/xcbaselines/9F54C8B3255D760B0065AFD6.xcbaseline/Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>runDestinationsByUUID</key> | ||
<dict> | ||
<key>7A4A2454-7A24-425D-84C2-116320B87F1E</key> | ||
<dict> | ||
<key>localComputer</key> | ||
<dict> | ||
<key>busSpeedInMHz</key> | ||
<integer>100</integer> | ||
<key>cpuCount</key> | ||
<integer>1</integer> | ||
<key>cpuKind</key> | ||
<string>Quad-Core Intel Core i7</string> | ||
<key>cpuSpeedInMHz</key> | ||
<integer>2700</integer> | ||
<key>logicalCPUCoresPerPackage</key> | ||
<integer>8</integer> | ||
<key>modelCode</key> | ||
<string>MacBookPro13,3</string> | ||
<key>physicalCPUCoresPerPackage</key> | ||
<integer>4</integer> | ||
<key>platformIdentifier</key> | ||
<string>com.apple.platform.macosx</string> | ||
</dict> | ||
<key>targetArchitecture</key> | ||
<string>x86_64</string> | ||
<key>targetDevice</key> | ||
<dict> | ||
<key>modelCode</key> | ||
<string>iPhone12,3</string> | ||
<key>platformIdentifier</key> | ||
<string>com.apple.platform.iphonesimulator</string> | ||
</dict> | ||
</dict> | ||
<key>FA3A7E89-3F08-4E7F-890A-B0903F68A94C</key> | ||
<dict> | ||
<key>localComputer</key> | ||
<dict> | ||
<key>busSpeedInMHz</key> | ||
<integer>100</integer> | ||
<key>cpuCount</key> | ||
<integer>1</integer> | ||
<key>cpuKind</key> | ||
<string>Quad-Core Intel Core i7</string> | ||
<key>cpuSpeedInMHz</key> | ||
<integer>2700</integer> | ||
<key>logicalCPUCoresPerPackage</key> | ||
<integer>8</integer> | ||
<key>modelCode</key> | ||
<string>MacBookPro13,3</string> | ||
<key>physicalCPUCoresPerPackage</key> | ||
<integer>4</integer> | ||
<key>platformIdentifier</key> | ||
<string>com.apple.platform.macosx</string> | ||
</dict> | ||
<key>targetArchitecture</key> | ||
<string>x86_64</string> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
2 changes: 2 additions & 0 deletions
2
Configuration/Apollo/Apollo-Project-Performance-Testing.xcconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#include "../Shared/Project-Release.xcconfig" | ||
|
||
ONLY_ACTIVE_ARCH = YES | ||
|
||
COPY_PHASE_STRIP = NO | ||
ENABLE_BITCODE = NO | ||
ENABLE_TESTABILITY = YES |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you setting up the perf tests to run in this PR? If so, we should probably get a baseline from CI rather than from one of our (almost certainly faster) local machines.
If it's not on this PR, keep that in mind for when we turn it on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I haven't looked into establishing a baseline on CI. That would have to somehow remember the results and make a commit, not sure how other projects handle that. I also don't think we should run performance tests on CI by default, because they are pretty costly (they need a whole separate optimized build). So it might be ok to only run them locally for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can set up a separate job to do the perf tests after merges - I'd definitely like to have them automated and running frequently, but it does make sense not to have them be a blocker to merging PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this should be handled in a separate PR thoguh)