Faster file handling

Just starting out? Need help? Post your questions and find answers here.
maw

Post by maw »

Yup! If you had read the entire thread, you'd have read that I had tried this with v3.x and that I and others had noted that PureBasic's file handling (especially strings) was slow. Why else would Rings have written the FastFile library?
I did read that, but what does that have to do with PB4 which is the current version?
Bingo! I read it, but hadn't tested it, nor did I claim that it was, when some one asked if my record processing could be the bottle neck, I said possibly since I had read that some string functions weren't as fast as they could be and my processing does do mostly string work.
So what you are really saying is that you like to jump to conclusions then?
And I supose you've never written code before that needed tweaking?
Did I say that? Nope. Infact I spend most of my time tweaking my code, an old and now obsolete habit from the Amiga. But what I don't do is assume it's the fault of PB and whine on the forum about how bad or slow this or that is, instead I assume I did it wrong and try a different approch. And lo and behold, in most cases, that does the trick! But hey, whatever works, or not, for you...
PureBasic is nice but its documentation is rather weak, I'm getting tired of having to write test programs to find out something that could have been in the documentation. I've lost track of how many such programs I've written....
There is no way in hell Fred and the gang can cover everything in the docs. And if you can't be bothered to write 1 single line of code to test a function, then I'd say you are simply lazy.

I have written several hundreds of small snippets to find out things like which way is the fastest way to do things, which way uses the least memory and so on. Sure, they could have put that all in the docs, but besides talking a great toll on the time they instead have put in the language, I wouldn't have learned as much as I have doing all those tests.
Really!? Where have you been? Every Basic I've used except PureBasic puts a leading space in the output from the Str command.
Well, there you have it. Everyone has different experiences, but atleast I don't expect Fred and the gang to cover all those differences in the docs!
Fred
Administrator
Administrator
Posts: 18409
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Tipperton wrote:
maw wrote:First you state that PB's file handling is really poor.
Yup! If you had read the entire thread, you'd have read that I had tried this with v3.x and that I and others had noted that PureBasic's file handling (especially strings) was slow.
When I discovered that PureBasic had released version 4 I decided to try it. It's nice but it appears the file reading and writting is still as slow as it was before.
Please stop arguing like that, especially with naw which is a valuable and experienced coder. A good practice when you are obviously wrong is to put somewhere "Well, i was wrong, sorry for all the mess and thanks for the help !".

Ha, and starting a post like:
Wow!

PureBasic is definately not the right choice when processing a large (1 GB) text file! Sad
is a not a good way when asking for help.

(yes, i'm bitching a bit but that's a bit annoying to read such thread).
maw

Post by maw »

Please stop arguing like that, especially with naw which is a valuable and experienced coder.
Ahh, there is nothing like a little love from The Master :oops: Well, atleast if he had gotten my name right :shock:

Love you too Frod :twisted:
(yes, i'm bitching a bit but that's a bit annoying to read such thread).
A bit? You really want those patience medals, don't you!? :lol:
Fred
Administrator
Administrator
Posts: 18409
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Outch, i read "naw" all this time :lol:. Time for some glasses..
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

well, no matter the argue, it's a good thing pb is fast enough, i'd almost join the crowd :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post by Tipperton »

Fred wrote:Please stop arguing like that, especially with naw which is a valuable and experienced coder.
I would and I guess he is since he is allowed to go on fault finding and hollier than thee spree and be blessed for it. On the forum I administer anyone treating others like that would be put on indefinite moderator preview for all his posts. It accomplishes nothing but create an argument.
Fred wrote:A good practice when you are obviously wrong is to put somewhere "Well, i was wrong, sorry for all the mess and thanks for the help !".
I did, in this post: http://www.purebasic.fr/english/viewtop ... 014#155728

I had made assumptions based on past experience with PureBasic 3.x, I now know those assumptions were wrong, I won't make that mistake again.

Except that I forgot to add... A big thanks to PB, it was his question about the DoEvents() function that lead me to the bottle neck. I still have it in there but now its only called once every 1,000 records instead of every record.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> Except that I forgot to add... A big thanks to PB, it was his question about
> the DoEvents() function that lead me to the bottle neck.

No problem. :) This is precisely why it's good to post example code with any
issues, so that we can see and offer any tips without asking many questions.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply