-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[WIP] Make Serializers serializable, Step 2 #1684
Closed
Closed
Conversation
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
.merge(cached_relationships(adapter_options, adapter_instance, include_tree)) | ||
end | ||
|
||
def cached_relationships(adapter_options, adapter_instance, include_tree) |
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.
could this be broken up in to more methods? / with comments?
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.
yeah, hence 'wip' :)
…ibutes in right spot
… was caching on: caching serializers: gc off 597.9825413721817/ips; 1745 objects caching off: caching serializers: gc off 576.9306068627038/ips; 1745 objects caching on: non-caching serializers: gc off 840.493020494064/ips; 1234 objects caching off: non-caching serializers: gc off 832.0417547059424/ips; 1234 objects caching on: caching serializers: gc off 676.494074362274/ips; 1745 objects caching off: caching serializers: gc off 644.3862313182249/ips; 1745 objects caching on: non-caching serializers: gc off 878.2599353175016/ips; 1234 objects caching off: non-caching serializers: gc off 847.1395402647764/ips; 1234 objects caching on: caching serializers: gc off 666.8441794123615/ips; 1745 objects caching off: caching serializers: gc off 640.9680661037794/ips; 1745 objects caching on: non-caching serializers: gc off 929.1861177725112/ips; 1234 objects caching off: non-caching serializers: gc off 858.6922209833513/ips; 1234 objects caching on: caching serializers: gc off 683.4188849478967/ips; 1745 objects caching off: caching serializers: gc off 650.3484452934335/ips; 1745 objects caching on: non-caching serializers: gc off 942.3903022345789/ips; 1234 objects caching off: non-caching serializers: gc off 880.6233058416065/ips; 1234 objects caching on: caching serializers: gc off 676.163805262553/ips; 1745 objects caching off: caching serializers: gc off 645.2491434607599/ips; 1745 objects caching on: non-caching serializers: gc off 924.4019986994008/ips; 1234 objects caching off: non-caching serializers: gc off 892.1286990682768/ips; 1234 objects Benchmark results: { "commit_hash": "52442e0", "version": "0.10.0.rc5", "rails_version": "4.2.6", "benchmark_run[environment]": "2.2.2p95", "runs": [ { "benchmark_type[category]": "caching on: caching serializers: gc off", "benchmark_run[result][iterations_per_second]": 683.419, "benchmark_run[result][total_allocated_objects_per_iteration]": 1745 }, { "benchmark_type[category]": "caching off: caching serializers: gc off", "benchmark_run[result][iterations_per_second]": 650.348, "benchmark_run[result][total_allocated_objects_per_iteration]": 1745 }, { "benchmark_type[category]": "caching on: non-caching serializers: gc off", "benchmark_run[result][iterations_per_second]": 942.39, "benchmark_run[result][total_allocated_objects_per_iteration]": 1234 }, { "benchmark_type[category]": "caching off: non-caching serializers: gc off", "benchmark_run[result][iterations_per_second]": 892.129, "benchmark_run[result][total_allocated_objects_per_iteration]": 1234 } ] }
…attributes is always empty
Benchmark results: { "commit_hash": "33ae947", "version": "0.10.0.rc5", "rails_version": "4.2.6", "benchmark_run[environment]": "2.2.2p95", "runs": [ { "benchmark_type[category]": "caching on: caching serializers: gc off", "benchmark_run[result][iterations_per_second]": 677.638, "benchmark_run[result][total_allocated_objects_per_iteration]": 1795 }, { "benchmark_type[category]": "caching off: caching serializers: gc off", "benchmark_run[result][iterations_per_second]": 647.854, "benchmark_run[result][total_allocated_objects_per_iteration]": 1795 }, { "benchmark_type[category]": "caching on: non-caching serializers: gc off", "benchmark_run[result][iterations_per_second]": 936.023, "benchmark_run[result][total_allocated_objects_per_iteration]": 1252 }, { "benchmark_type[category]": "caching off: non-caching serializers: gc off", "benchmark_run[result][iterations_per_second]": 882.823, "benchmark_run[result][total_allocated_objects_per_iteration]": 1252 } }
01c10ce
to
ea5ea72
Compare
This was referenced Jun 1, 2016
Resolve by linked issues, yay! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
As part of fixing the caching issues, this PR continues to moving the responsibility
of serializing attributes and associations from the adapter to the serializer.
This change allows the adapter to focus on its job: adapting the resource serialization
to the (output) API format.
Changes
TBD
Caveats
TBD
Related GitHub issues
Continues from #1638
Additional helpful information