[Kss-devel] ree-stripout-comments branch

Jeroen Vloothuis jeroen.vloothuis at xs4all.nl
Wed May 9 09:23:27 CEST 2007


Balazs Ree wrote:
> This results, in full compression mode, a 104K code 
> size, and compared to the current 129K this means a 19% win at the first 
> try. It may also be a bit faster, but I can't estimate this.
>   
Saving 19% on the download alone seems worth it.
> Something about the technology.
>
> The ;;; construct works reasonable well, but it has some artifacts. I am 
> using the following patterns in the commentification:
>
> This cannot be used however
>
>   - inside expressions that span multiple lines (like () or a string +)
>
>   - inside the switch statement
>   
Is it not possible to think of a multine stripping feature? Maybe 
something like a special debug function:

  function debug(func){
    func();
  }

  debug(function(){
    alert('pinda');
    for(var i=0; i<3; i++){
      alert('cheese '+i);
    }
  });

You could write the stripper so that it would know about this special 
debug function and it would remove all calls to it.


More information about the Kss-devel mailing list