Skip to content
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] Schema and InternalModel improvements to reduce overhead #1

Open
wants to merge 7 commits into
base: lnkd/master
Choose a base branch
from

Conversation

runspired
Copy link
Owner

@runspired runspired commented Sep 20, 2016

Some notes:

  • It seems many of ember-data's tests are intricately tied to specific implementations of the Internals even when not needed for the test in question. We need to funnel test abuse of private API through a central location so we can address these errors more quickly and refactor more easily.
  • It seems that many of the adapter and serializer methods are wrapped in multiple abstraction layers that make refactoring harder, likely carry perf costs, and obfuscate code patterns.
  • This change does not actually do the batching that we should do, it just unlocks being able to do so.
  • Need to update heimdall-query to show counter stats
  • Need to update heimdall-instrumentation PR with counter stats, docs, feedback
  • @bcardarella was so kind as to point me to this thing he made, should be updated to show mixin use as well but it begins to reveal some of the complexity that needs to be flattened. https://ember-twiddle.com/#/8343688ec39c38b5cb4dc4c29f76905a?fullScreen=true
  • perf benchmarks: While this is still very WIP, here are preliminary perf results (~10% improvement).

Baseline:
screen shot 2016-09-20 at 2 43 31 am

With Changes:
screen shot 2016-09-20 at 2 38 11 am

@runspired runspired force-pushed the lnkd/master branch 2 times, most recently from 3c6d7b4 to c057f8a Compare September 20, 2016 10:16
…formation about a Model class.

Short term this allows us to avoid a large number of extraneous lookups and aides in enabling batching operations by record type.  Near term this will enable us to remove the dependency on DS.Model from store logic.  Long term this will enable us to reduce situations that are megamorphic to polymorphic, and enable end users to expose their own Model class.
This will introduce a performance regression because of the use of ES2015 Class, the transpiled form of which relies on an expensive classCallCheck. @runspired will be adding a babel plugin to strip this classCallCheck at which time we will regain any lost instantiation performance.
runspired pushed a commit that referenced this pull request Apr 24, 2019
* Fix lint error

* Fix `_requireBuildPackages` error

* Reset yarn.lock from master

There seems to be some issues in the yarn.lock

To solve them I ran:
- `git checkout master yarn.lock`
- `yarn`

Throw an error in case of dependency mismatch (#2)

* Throw an error in case of dependency mismatch

An app (or addon) that consumes ember-data should have:
- either jquery
- or ember-fetch version 6.0.0 or above

Throw a build error if it's not the case.

* Remove ember-fetch as a peerDependency

Move ember-fetch to dependencies (#3)

Indeed, two `ember-fetch`'s modules are imported in rest-adapter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant