[Glass] GsFile >> #next at least 4 times slower than Pharo

Richard Sargent via Glass glass at lists.gemtalksystems.com
Tue Mar 31 10:57:31 PDT 2015


GLASS mailing list wrote
> On Tue, Mar 31, 2015 at 2:58 PM, Dale Henrichs via Glass <

> glass at .gemtalksystems

>> wrote:
> 
>>  Yeah, we are pretty slow in this particular area  ... the current GsFile
>> class is designed for doing file i/o on remote clients as well as the
>> local
>> server and does not have some of the optimizations available if we were
>> doing server only/native i/o ... for 3.3 we are adding optimized support
>> for local server files ...
>>
>>
> OK, good. Just wanted to be sure I wasn't missing something obvious. And
> yeah, I saw that...checking in #next and friends I saw you had to do quite
> some logic every time to check wether you were in client or server side...
>   3.3 looks promising.
> 
> I think that folks have tended to load the contents of the file into a
>> String and then using a ReadStream ...
>>
>>
> Yes, I did that for SIXX export / import. But in this case I am dealing
> with a 1GB text file..... 27MM or rows :)
> 
> But thanks for the tip, though.

You can fairly easily created a buffered stream wrapper that would read the
file in large chunks (e.g. 100 Kb) and let you get from it byte by byte.
That would come pretty close to making up most of that 40x.



> 
>> Dale
>>
>>
>> On 03/31/2015 09:26 AM, Mariano Martinez Peck via Glass wrote:
>>
>> Hi guys,
>>
>>  I am processing some large files and I find out that GsFile reading is
>> way slower than it is in Pharo. At least 4 times slower. The way I am
>> opening the file is:
>>
>>   GsFile openReadOnServer: aFilename
>>
>>  and then... for my benchs I simply iterate and do a #next.
>>
>>  Is there some setting maybe I can set to GsFile instance that would give
>> me a speedup? or it's simply the way the file primitives work in
>> GemStone?
>>
>>  Thanks in advance,
>>
>>
>>  --
>> Mariano
>> http://marianopeck.wordpress.com
>>
>>
>> _______________________________________________
>> Glass mailing 

> listGlass at .gemtalksystems

> ://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>>
>>
>> _______________________________________________
>> Glass mailing list
>> 

> Glass at .gemtalksystems

>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>>
> 
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com
> 
> _______________________________________________
> Glass mailing list

> Glass at .gemtalksystems

> http://lists.gemtalksystems.com/mailman/listinfo/glass





--
View this message in context: http://forum.world.st/Glass-GsFile-next-at-least-4-times-slower-than-Pharo-tp4816419p4816451.html
Sent from the GLASS mailing list archive at Nabble.com.


More information about the Glass mailing list