[Laszlo-dev] For Review: Change 20070118-ptw-n Summary: Split gigantic strings in SWF

Philip Romanik promanik at laszlosystems.com
Fri Jan 19 07:25:54 PST 2007


approved.

However, you can construct a case where the splitting will fail. For 
example, consider this string:
   15000 instances of a 4-byte character
   1M instances of a 1-byte character

The string has 1,015,000 characters and 1,060,000 bytes. When you compute 
the number of chunks you get 17. And when you compute the number of 
characters per chunk you get 1,015,000/17 = 59705. However, 59705 
characters in the first chunk is 104705 bytes.




>Change 20070118-ptw-n by ptw at dueling-banjos.local on 2007-01-18
>14:29:28 EST
>      in /Users/ptw/OpenLaszlo/legals-2
>
>Summary: Split gigantic strings in SWF
>
>Bugs Fixed:
>LPP-3415: 'Compiler error running charting test (swf)'
>
>Technical Reviewer: promanik (pending)
>QA Reviewer: hminsky (pending)
>Doc Reviewer: n/a
>
>Details:
>      Instructions: measure size of Strings accurately.
>
>      CodeGenerator: If string would exceed SWF limit, split it until it
>      does not and join the splits in the runtime.
>
>Tests:
>test/charts/linechart/test_line_06.lzx
>
>Files:
>M      WEB-INF/lps/server/src/org/openlaszlo/sc/Instructions.java
>M      WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
>
>
>Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070118-ptw-
>n.tar



More information about the Laszlo-dev mailing list