Skip to content
Snippets Groups Projects
  1. Mar 16, 2013
    • deuce's avatar
      Fix version for get_size() and flatten() · 8338df89
      deuce authored
      8338df89
    • deuce's avatar
    • deuce's avatar
      Add a flatten() command which takes a string as an argument. · da813689
      deuce authored
      This is to deal with the fact that when you concatenate JS strings, the JS
      engine simply notes that they are concatenated, but keeps all the original
      strings around until something flattens them.  This code:
      
      for(;;) {
      	str += ascii(random(256));
      	log(str.length);
      }
      
      Fails when str reaches about 256KiB then crashes with out of memory but
      this code:
      
      for(;;) {
      	str += ascii(random(256));
      	log(str.length);
      }
      
      Reaches a size of 4MB without stopping.
      
      Any time you actually paw through the string, it gets flattened, but when
      you do a bunch of concatenation, manually flattening can be a Good Thing.
      da813689
    • deuce's avatar
      Match case insensitively for headers. · ce8e3c63
      deuce authored
      Try to recv() Content-Length bytes when specified, and 1024 bytes at a
      time when not.
      Call js.gc() after each recv().
      
      The gc() call fixes the "out of memory" error which occured on HTTP pages
      over about 128KiB and makes reading web pages considerably faster.
      ce8e3c63
  2. Mar 14, 2013
  3. Mar 13, 2013
  4. Mar 12, 2013
  5. Mar 05, 2013
  6. Mar 01, 2013
  7. Feb 28, 2013
  8. Feb 27, 2013
  9. Feb 26, 2013
  10. Feb 19, 2013
  11. Feb 18, 2013
  12. Feb 17, 2013
Loading