Our mantra here is to ship features quickly and optimize ’em later. And after spending a lot of frustrated time waiting for profiles to load (especially very large profiles), we decided it was officially “later” and set out to improve profile loading times last week.
We ended up moving a lot of the rendering code from Javascript to Python, where it’s both faster and more maintainable, and doing some caching. The result: profiles like Heather’s are now loading around five seconds faster; bigger profiles will see even larger improvements. The difference is especially pronounced when you switch back and forth between viewing the profile and zooming in to individual products: the return trip is now almost instant, which we’re really happy about.
There’s still a lot of room to improve loading times, especially on the first profile load, but we’re going to wait on this for now, at least until we get feedback requesting faster loads. That means we’ll be able to turn our attention to shipping new features…we’ve got some coming up next week we can’t wait to show y’all!
Any details on how you cache stuff?
Sure! We’re the native cache function built into the $http and $resource services provided by Angular.js. Easy peasey. We just have to clear that cache anytime the user changes anything in her products.