You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when the store is destroyed we iterate and unload all records. This takes a surprisingly large amount of time. In many of ember-data's tests ~20-30% of time spent is spent in our store's destroy lifecycle during teardown.
Unfortunately, we can't simply "not tear things down", because stores are also destroyed for fastboot app instances and cleanup is important for ensuring memory leaks don't happen.
We should re-examine what we actually do/do-not need to cleanup for fastboot/tests and figure out if there isn't a way to do less work.
For ember-data, this could improve our test-suite performance from ~35s to ~25s per test run. While this might not seem like much, we run our tests ~30x/commit to cover all the various scenarios (~3.5min saved). And ember-data only has ~1700 tests. Applications with far larger test suites could significantly benefit from faster teardown, especially those based on libraries like miragejs which encourage over-mocking or which require setting up large amounts of data for even basic acceptance and integration tests.
The text was updated successfully, but these errors were encountered:
#8084 significantly improved the teardown case. Likely still more wins out there. Differentiating between "store is tearing down" and "unloadAll was called" would be the key.
going to close for now as I think current gains have eliminated lowest hanging fruit. Once we no longer extend anything from EmberObject we should revisit.
Currently, when the store is destroyed we iterate and unload all records. This takes a surprisingly large amount of time. In many of ember-data's tests ~20-30% of time spent is spent in our store's destroy lifecycle during teardown.
Unfortunately, we can't simply "not tear things down", because stores are also destroyed for fastboot app instances and cleanup is important for ensuring memory leaks don't happen.
We should re-examine what we actually do/do-not need to cleanup for fastboot/tests and figure out if there isn't a way to do less work.
For ember-data, this could improve our test-suite performance from ~35s to ~25s per test run. While this might not seem like much, we run our tests ~30x/commit to cover all the various scenarios (~3.5min saved). And ember-data only has ~1700 tests. Applications with far larger test suites could significantly benefit from faster teardown, especially those based on libraries like
miragejs
which encourage over-mocking or which require setting up large amounts of data for even basic acceptance and integration tests.The text was updated successfully, but these errors were encountered: