> Le 18 sept. 2018 à 18:50, Dani Beaubien <[email protected]> a > écrit : > > This has been a very interesting discussion. I decided to test the various > techniques using the code I pasted below. > [...]
Thanks for testing :-) Some thoughts… - I had surprises with tests using a single string of the same length ($textToAdd:="123456789") vs "true" samples (various length) - the more you concatenate, the slower it is - the longer the string you add too, the slower it is <https://screencast.com/t/W29IFFNs3> - I use the "growing blob" in 32bits since a while now, no blob size problem - I don't remember of a situation were strings to concatenate were not in a text array before, this is some code to test filling such an array: $textToAdd:="123456789"*100 //changing length here does not seem to change the speed; try random too… $end_l:=Tickcount+(60*10) $i_l:=0 $ms_l:=Milliseconds ARRAY TEXT($concat_at;0) ARRAY LONGINT($ms_al;0) Repeat $i_l:=$i_l+1 APPEND TO ARRAY($concat_at;$textToAdd) If ($i_l%2000=0) APPEND TO ARRAY($ms_al;Milliseconds-$ms_l) $ms_l:=Milliseconds End if Until (Tickcount>$end_l) $average_r:=Average($ms_al) $max_r:=Max($ms_al) $min_r:=Min($ms_al) TRACE - SSD disks are great if memory can be a problem loop add to text array if(text array size is more than xxx) concatenate text array into text //using blob of course ;-) append text to file set text array to zero end if end loop - see also >http://forums.4d.com/Post/FR/19466463/1/19466704#19466704>, I didn't test -- Arnaud de Montard ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

