Backbone: firing an event only once on a Collection 'change'

backbone-events, backbone.js, backbone.js-collections

Solution

Whenever you are updating the attributes on the models in bulk, pass `{silent:true}` as an option, which `will suppress any events from being fired.`

Then trigger a custom event for which a view or multiple views listening to the same.

Problem

Simple question: What is the best way to fire an event 'only once'? I have a Collection in backbone with multiple models. Sometimes multiple models' attributes are updated at once, firing multiple 'change' events on the Collection. What is the best way to fire the 'change' event only once, grouping all attribute changes together? My best idea at the moment is using a timer but this will only capture the first model attribute change. All suggestions, ideas and solutions are valued. Thank you :). Context: In this case the event fires a very computationally intensive function, therefore multiple runs must be avoided.

Original source