georgephillips
georgephillips

Reputation: 3570

Inefficiency with backbone models?

I'm using backbone to create a gps data visualiser. I am storing each gps datum in a backbone model and storing all of the data in a collection. What kind of overhead is involved with using this compared to an array and json objects?

I am retrieving gps for anywhere between 1 and 20+ tracked objects for 5 minutes to 10 hours. There will be a point every second. On average 25,000 points per session.

At the moment I use up to a 1gb of ram and can get very sluggish. The data can not be compressed anymore.

Thanks in advance

Upvotes: 2

Views: 207

Answers (1)

Duncan Bayne
Duncan Bayne

Reputation: 3949

My experience is that conjecture is much less valuable than metrics in this sort of situation. You'd be much better off profiling the different approaches and seeing how much overhead is added in your particular case.

See http://jtaby.com/2012/04/23/modern-web-development-part-1.html for a starting point, but you can also use OS profilers to tell you your overall memory and CPU usage by the browser itself.

Upvotes: 2

Related Questions