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 / Slow APK versus Broadcast when parsing a text file.

Author
Message
wyrleywolves2
6
Years of Service
User Offline
Joined: 16th Jan 2018
Location:
Posted: 10th May 2021 16:10
Can anybody help me speed up the load times of my APK? https://forum.thegamecreators.com/thread/203493 -I have found this post, but can't find where to put the text file. Windows, broadcasting, and Html5 instantly load. APK takes 30 seconds plus to load.
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 10th May 2021 20:34
I believe all you have to do is save the file once, after you have read it in. It automatically goes into your sandboxed area, and thenceforth AppGameKit checks for the file in the sandboxed area.

Another option would be to save the data in a array beforehand and use the load array function to read it in. I'm thinking array loads are faster than a readline() loop.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 10th May 2021 23:23 Edited at: 10th May 2021 23:24
ranietz began discussion on discord ~6 months ago re: reading a 760k word file, line by line, which took many (many) minutes on android.

in the end, loading 768k words as a .json array file, instead, took a mere 1.6 seconds. see the array (2.0) guide (near the bottom) re: saving as .json

otherwise, the thread title (same with the old thread you referenced) cite the actual parsing as being the slowdown so i'm a little confused about your inquiry; especially where it includes "where to put the text file"?) so, if rich and i are off the mark, let us know?
[My Itch.io Home] [Now Playing]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]
wyrleywolves2
6
Years of Service
User Offline
Joined: 16th Jan 2018
Location:
Posted: 11th May 2021 09:30
Thanks for your replies. Converting to a Json array worked perfectly. I was working under the assumption that compression was the issue.

Login to post a reply

Server time is: 2024-11-24 04:19:36
Your offset time is: 2024-11-24 04:19:36