#106272 - 2003-10-30 04:43 AM
Re: POLL: String Expressions
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
Interesting, isn't it?
I'm currently running a test script on one of our work computers and it's atcode:
String length = 133,300,000 = 130,175 kB = 127 MB
while adding 100,000 characters to the string on each iteration.
Personally, I think that the limit might be the same number as the number of elements in an array (according tot he KiXtart v4.22 RC1 Manual)
I was actually interested to see if anyone can fidn the solution before asking Ruud ;-)
And based on the poll, only two people have voted for the number I suspect is the winning one. Most went for the incorrectly documented 32,000 character limit.
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#106274 - 2003-10-30 06:28 AM
Re: POLL: String Expressions
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11623
Loc: CA
|
Thanks Jack,
Still waiting for a VALID script to use for testing on Server.
|
Top
|
|
|
|
#106275 - 2003-10-30 05:08 PM
Re: POLL: String Expressions
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
NTDOC: Here's my test script
code:
cls break on
$rc=setoption('NoVarsInStrings','on') $rc=setoption('Explicit','on')
dim $StartStringLength, $FinalStringLength, $StringSegmentLength, $StringSegmentsToAdd dim $SegmentCount, $CurrentStringLength, $CurrentSize, $StringSegment
$StartStringLength=0 $FinalStringLength=25000000000 $StringSegmentLength=10000000
$StringSegmentsToAdd=cdbl($FinalStringLength)/$StringSegmentLength
dim $StringSegmentPart[$StringSegmentLength/1000], $String[cdbl($StartStringLength)/$StringSegmentLength] $StringSegmentPart=join($StringSegmentPart,'abcdefghij') $StringSegment='' for $SegmentCount=1 to 100 $StringSegment=$StringSegment+$StringSegmentPart next $SegmentCount = 0
if ubound($StartStringLength) $String=join($String,'abcdefghij') endif ;$rc=redirectoutput(@SCRIPTDIR+'\stringtest.txt')
? 'String Length Start = ' + formatnumber(len($String),0,-1) ? 'String Length Final = ' + formatnumber($FinalStringLength,0,-1) ? 'String Segment Length = ' + formatnumber(len($StringSegment),0,-1) ? '# Segments To Add = ' + formatnumber($StringSegmentsToAdd,0,-1)
while $SegmentCount<$StringSegmentsToAdd and not @ERROR $String=$String+$StringSegment $SegmentCount=$SegmentCount+1 $CurrentStringLength=cdbl(len($String)) $CurrentSize=val($CurrentStringLength/1024/1024) ? 'Current String Length ('+formatnumber($SegmentCount,0,-1)+') = ' + formatnumber($CurrentStringLength,0,-1) + ' = ' +formatnumber($CurrentSize,0,-1) +' MB' loop if not @ERROR ? 'Final String Length ('+formatnumber($SegmentCount,0,-1)+') = ' + formatnumber($CurrentStringLength,0,-1) + ' = ' +formatnumber($CurrentSize,0,-1) +' MB' else ? 'Error at step '+$SegmentCount+' = ' + formatnumber(len($String),0,-1)+ ' = '+formatnumber(cdbl(len($String))/1024/1024,0,-1)+' MB' endif
exit 0
[ 30. October 2003, 17:09: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#106286 - 2003-11-04 01:29 AM
Re: POLL: String Expressions
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11623
Loc: CA
|
Think I found the limit (at least according to Jens script).
Script ran on HP/Compaq DL580-G3 Quad Xeon 2.0GHz CPU w/2MB L3 Cache Windows 2003 Enterprise Server 6GB RAM
The script starts to rebuild at 448MB
quote: Current String Length (87)=390,000,000=371 MB Current String Length (88)=400,000,000=381 MB Current String Length (89)=410,000,000=391 MB Current String Length (90)=420,000,000=400 MB Current String Length (91)=430,000,000=410 MB Current String Length (92)=440,000,000=419 MB Current String Length (93)=450,000,000=429 MB Current String Length (94)=460,000,000=438 MB Current String Length (95)=470,000,000=448 MB Current String Length (96)=0=0 MB Current String Length (97)=10,000,000=9 MB Current String Length (98)=20,000,000=19 MB Current String Length (99)=30,000,000=28 MB Current String Length (100)=40,000,000=38 MB Current String Length (101)=50,000,000=47 MB Current String Length (102)=60,000,000=57 MB Current String Length (103)=70,000,000=66 MB Current String Length (104)=80,000,000=76 MB Current String Length (105)=90,000,000=85 MB Current String Length (106)=100,000,000=95 MB Current String Length (107)=110,000,000=104 MB Current String Length (108)=120,000,000=114 MB Current String Length (109)=130,000,000=123 MB Current String Length (110)=140,000,000=133 MB Current String Length (111)=150,000,000=143 MB Current String Length (112)=160,000,000=152 MB Current String Length (113)=170,000,000=162 MB Current String Length (114)=180,000,000=171 MB Current String Length (115)=190,000,000=181 MB Current String Length (116)=200,000,000=190 MB Current String Length (117)=210,000,000=200 MB Current String Length (118)=220,000,000=209 MB Current String Length (119)=230,000,000=219 MB Current String Length (120)=240,000,000=228 MB Current String Length (121)=250,000,000=238 MB
[ 04. November 2003, 01:32: Message edited by: NTDOC ]
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 262 anonymous users online.
|
|
|