I’ve just updated my app to Ember 1.8 and Ember Data beta 11 (from Ember 1.7 and Ember Data beta 9) and I’ve noticed a 10+% slowdown on calls to store.pushPayload (with 5000+ items). The 10% difference is extremely noticeable because the call is already very slow on Android (my target platform).
Is this a known issue? Is there anywhere specific I should start looking to optimise this? Or a way to debug exactly what’s taking the time?
Can you provide an example. In my tests we are doing significantly better on this metric. Maybe some later work regressed or some scenario (maybe yours) is worse.
Does it happen on every route? Can you post your model definitions, do you have lots of hasMany relationships? I am working on lots of perf improvements for beta.12 would be great to test on your app.
Weirdly I’ve just tried to reproduce and I’m not actually seeing a slowdown on Android. I am, however, seeing it in Chrome on desktop:
That’s just one run but it seems to be fairly consistent across runs.
The equipmentItems model which is slowing things down looks like:
import DS from "ember-data";
export default DS.Model.extend({
qrId: DS.attr('number'),
model: DS.attr('string'),
year: DS.attr('string'),
size: DS.attr('string'),
soleLength: DS.attr('number'),
type: DS.belongsTo('equipment_type'),
typeId: DS.attr('number'), // Duplicate of type - used so we don't have to query a relationship when putting the items into buckets by type for a much faster startup.
package: DS.belongsTo('package_level'),
currentRentals: DS.hasMany('rented_item')
});
So there is a few relationships involved.
Let me know if there is more I can do to help test…
@stefan - I’d love to help but I’m afraid I can’t provide a running example - the data is a client’s and contains confidential information. I can try and add a scenario to the perf-stress repo - what should the example do? Just load some data which is indicative of the data I am loading where performance regressed? And does the perf-stress setup include a way to measure regressions between versions of ember?
Please provide an example that accurately represents the complexity + data volume that your client app has.
Currently the regression measurement is still manual. But regardless, providing your scenario (with representative relationships models and sanitized data and likely a similar rendering strucutre) will allow us to identify specific bottlenecks and improve them.
Any scenarios you add to the perf-stress app will likely become part of the future planned perf regression suite.