jQuery encourages us to .detach() elements to work with them: http://learn.jquery.com/performance/detach-elements-before-work-with-them/

Here’s a little plugin to help do just that (relies on my .insertAt method found here)…

$.fn.insertAt = function(elements, index) {
    var array = $.makeArray(this.children().clone(true));
    array.splice(index, 0, elements);
    this.empty().append(array);
    return this;
};
$.fn.work = function(callback /*, ... rest */){
    var params = Array.apply(null, arguments).slice(1);
    var parent = this.parent();
    var index = this.index();
    this.detach();
    callback.apply(this, params);
    parent.insertAt(this, index);
    return this;
}

Usage:

$('selector').work(function(){
  // append a thousand elements to this
});

POC: http://jsfiddle.net/moagrius/YmPHB/