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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list
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, 

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list
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 ...

I think that folks have tended to load the contents of the file into a String and then using a ReadStream ...

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, 


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list


On Tue, Mar 31, 2015 at 2:58 PM, Dale Henrichs via Glass <[hidden email]> 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. 
 
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, 


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

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

Richard Sargent
Administrator
GLASS mailing list wrote
On Tue, Mar 31, 2015 at 2:58 PM, Dale Henrichs via Glass <
[hidden email]> 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 [hidden email]://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>
> _______________________________________________
> Glass mailing list
> [hidden email]
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>


--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass