$(function(){

    var getUniqueArray = function( array ){
        return array.filter(function(elem, pos, self) {
            return self.indexOf(elem) === pos;
        });
    };

    var getUniqueWordListFromSource = function( $target ){
        var tmpArray = [];
        $target.each(function(){
            tmpArray.push( $(this).text() );
        });

        return getUniqueArray( tmpArray );
    };

    var getUniqueElementListFromSource = function( $target ){
        var tmpObj = {};
        $target.each(function(){
            if (! tmpObj.hasOwnProperty($(this).text())) {
                tmpObj[ $(this).text() ] = [];
            }
            tmpObj[ $(this).text() ].push( $(this) );
        });
        return tmpObj;
    };

    $(function(){

        $('.translation').each(function(){
            var $this = $(this),
                $source = $this.find('.source'),
                $target = $this.find('.target'),
                elementObj = getUniqueElementListFromSource($this.find('.source').find('.match, .hoge'));

            $target
                .autosize()
                .on('textarea.highlighter.match', function(e, data){

                    $source.find('.added').removeClass('added');

                    var i = 0, j = 0, imax = 0, jmax = 0, tmpList = null, tmpText = null;

                    imax = data.textList.length;

                    for (i = 0; i < imax; i++) {
                        tmpText = data.textList[i];

                        if (elementObj[ tmpText ]) {
                            tmpList = elementObj[ tmpText ];
                            jmax = tmpList.length;

                            for (j = 0; j < jmax; j++) {
                                tmpList[j].addClass('added');
                            }
                        }
                    }
                })
                .textareaHighlighter({
                    // maxlength: 150,
                    matches: [
                        {'className': 'matchHighlight', 'words': getUniqueWordListFromSource( $source.find('.match') )},
                        {'className': 'hogeHighlight', 'words': getUniqueWordListFromSource( $source.find('.hoge') )}
                    ]
                });
        });


        $('.translation-max').each(function(){
            var $this = $(this),
                $source = $this.find('.source'),
                $target = $this.find('.target');

            $target
                .autosize()
                .textareaHighlighter({
                    matches: [
                        {'className': 'matchHighlight', 'words': getUniqueWordListFromSource( $source.find('.match') )},
                        {'className': 'hogeHighlight', 'words': getUniqueWordListFromSource( $source.find('.hoge') )}
                    ],
                    // maxlength: 150,
                    maxlengthWarning: 'warning',
                    maxlengthElement: $this.find('.maxlength')
                });
        });

    });

});
@@ -1037,16 +1037,56 @@
 .hoge'))
+,%0A                matchDelayTimerId = -1
 ;%0A%0A     
@@ -1201,75 +1201,302 @@
 a)%7B%0A
-%0A                    $source.find('.added').removeClass('added');%0A%0A
+                    if (matchDelayTimerId !== -1) %7B%0A                        clearTimeout(matchDelayTimerId);%0A                        matchDelayTimerId = -1;%0A                    %7D%0A                    matchDelayTimerId = setTimeout(function()%7B%0A                        matchDelayTimerId = -1;%0A    
     
@@ -1582,16 +1582,90 @@
  null;%0A%0A
+                        $source.find('.added').removeClass('added');%0A%0A    
         
@@ -1698,32 +1698,36 @@
 xtList.length;%0A%0A
+    
                 
@@ -1783,16 +1783,20 @@
         
+    
 tmpText 
@@ -1836,24 +1836,28 @@
             
+   
+ 
 if (elementO
@@ -1869,24 +1869,28 @@
 mpText %5D) %7B%0A
+    
             
@@ -1966,16 +1966,20 @@
         
+    
 jmax = t
@@ -1986,32 +1986,36 @@
 mpList.length;%0A%0A
+    
                 
@@ -2083,24 +2083,28 @@
             
+    
 tmpList%5Bj%5D.a
@@ -2121,16 +2121,50 @@
 dded');%0A
+                                %7D%0A
         
@@ -2224,32 +2224,38 @@
                %7D
+, 80);
 %0A               

add delay on match event for better performance