-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loadString() for big .txt files #2661
Comments
Did you try a smaller file? |
Yes I just did. It seems to work fine. |
@Bomel Can you open the developer console and see if there's any error in there (Cmd + Alt + J in most browsers) |
@limzykenneth there seems to be an error message: The first one is probably not the problem, it is fixed by adding <meta charset="UTF-8"> in But the second looks more interesting, this happens when I try load the .txt from TypeError: NetworkError when attempting to fetch resource. When I try to load it from |
How big is the file you are loading? I'll see if I can try to duplicate the issue on my side. |
@limzykenneth |
I finally got to test the file and it works as expected on Safari and Chrome but hit a memory allocation limit on Firefox. I'm not able to replicate your error but I would guess it has something to do with the max file size servable. Depending on your situation, you may need to explore other ways of using data from that file, either off load the lookup to a server or serving smaller chucks of files. |
@limzykenneth Thank you, i'll tried to load the file in Firefox. I will try to load it with other Browsers and give you an update :) |
#3127 solves this |
fixed with #3127 |
Most appropriate sub-area of p5.js?
Which platform were you using when you encountered this?
This is my first Issue, so plase keep that in mind while reading it.
I tried to load in the
preload()
function a.txt
file using the function loadString(). The Problem I get is, that in the browser it keeps saingLoading...
.The
output_coord_cartesian.txt
is a large file and not loadable in the standart text editors. I think that loading the file just takes very very long in p5.js. If it is so, is there a way around this problem?Here is my code... maybe it is a diffrent kind of problem
sketch.js
:and
index.html
:Edit:
Smaller files work fine.
The text was updated successfully, but these errors were encountered: