                     return;
                     
                 case "GET SAMPLES":
-                    trace(PREFIX, "Sending", getSampleCount(), "samples");
+                    var count:int = getSampleCount();
+                    
+                    trace(PREFIX, "Sending", count, "samples");
 
-                    _socket.send("SENDING SAMPLES: " + getSampleCount());
+                    _socket.send("SENDING SAMPLES: " + count);
+                    
+                    var samples:Array = []
                     
                     for each (var s:Sample in getSamples()) {
-                        _socket.send(sampleToString(s));
+                        samples.push(s);
                     }
                     
-                    trace(PREFIX, "Done sending samples");
+                    var batchSize:int = 1000;
+                    var offset:int = 0;
+                    
+                    _sampleSender = new Timer(100, Math.ceil(count / batchSize) );
+                    _sampleSender.addEventListener(TimerEvent.TIMER, function(e:Event):void {
+                        var toSend:int = Math.min(count, offset + batchSize);
+                        
+                        trace(PREFIX, "Sending", offset, "-", toSend);
+                        
+                        for( var i:int = offset; i < toSend; i++ ) {
+                            _socket.send(sampleToString(samples[i]));
+                            
+                            if( i % 100 == 0) {
+                                trace(PREFIX, "Sent", i, "/", toSend);
+                            }
+                        }
+                        
+                        offset += batchSize;
+                    });
+                    _sampleSender.addEventListener(TimerEvent.TIMER_COMPLETE, function(e:Event):void {
+                        trace(PREFIX, "Done sending samples");
+
+                        _sampleSender = null;
+                    });
+                    _sampleSender.start();
                     
                     return;
                     

	    private var _port:int;
	    private var _socket:XMLSocket;
	    private var _connected:Boolean;
	
    	public function Agent() {
    	    trace(PREFIX, "Loaded");

                    "\n   size: " + dos.size +
                    stackToString(dos.stack) +
                    "\n]";
            } 
            
            return "[Sample" +
                "\n   time: " + s.time +
                stackToString(s.stack) +
