Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / ReadString from file takes a lot of time?

Author
Message
pinete
12
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 30th Sep 2017 08:19 Edited at: 30th Sep 2017 08:35
Hi my friends,
Although the subject of the post make reference to readstring, I'm really referring to READLINE. Sorry but I don't know how to change the title of the post.

I've noticed that reading a text file of about 65000 lines with READLINE until EOF takes about 2 minutes in a medium Android device (Huawei Y6 II in this case, a mobile of 2016). In a PC the file is read instantly.
So my question is, firstly, if this is normal.
..and secondly, if so, what should be the way to accelerate dramatically the process, as is heartbreaker to have a player waiting 2 minutes until a data file is loaded .
Readbyte/integer maybe?

Thanks a lot in advance!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Sep 2017 09:34
if you do a text$ = text$ + row$ this can slow down.

maybe convert the lines to WriteString2 into a binary format. i guess its faster.
then use ReadString2

write the count as integer then the rows
read count, dim your array, read lines into with for next
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.7.2) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
pinete
12
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 30th Sep 2017 09:42
Thanks a lot for the ideas Markus! much appreciated!
I'll try and let you know

Login to post a reply

Server time is: 2024-04-23 18:07:16
Your offset time is: 2024-04-23 18:07:16