HomeSQLclA Person who won’t read has no advantage over one who can’t read


A Person who won’t read has no advantage over one who can’t read — 3 reacties

  1. Awesome stuff, Erik.

    One thing that springs to my mind is when you compare lineContents.length to 32767.
    I’m not 100% sure and haven’t tested, but I believe length returns characters of the string, not bytes?
    So with multi-byte Unicode characters I think you might risk that lineContents may be 32767 bytes.

    I haven’t tried it – just a potential nitpick 😉

    Keep up the good work


    • Absolutely correct Kim. It’s something you need to be careful with.
      I haven’t tested it either. But I suspect you’re right.
      The main reason for the ‘buffering’ of the characters is that I don’t want to potentially execute tens of thousends of plsql blocks to add a character at a time to the bindvariable.
      I realized that collecting the entire file in the buffer could become a problem for larger files so I introduced the threshold.

      Without testing, it would probably be safer to set that threshold to e.g. 10.000.
      That would still decrease the amount of plsql executions by a factor 10k, and leave enough room for multibyte charcters.

      Thanks for the heads up!!

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

Deze site gebruikt Akismet om spam te verminderen. Bekijk hoe je reactie-gegevens worden verwerkt.

HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">