limit on size of Javascript files?

User 2981014 Photo


Registered User
3 posts

I'm just learning JS, so this question is elementary. I have a .js file which is basically a (long) list of sentences (in Italian -- the web site will be a tool for learning Italian). It works fine -- until the number of lines in the file reaches about 2770, some (not many) of which are blank lines separating batches of sentences. But, if I then add another batch, with exactly the same kind of code, format, etc (I've checked that very carefully!), it doesn't work (won't print the batch to document). If there is a limit to the size of a .js file, that would explain the problem. If not, I'm totally baffled! I could post some sample code to get help. But first I need to know if there is a limit. This is not a CoffeeCup issue -- exactly the same thing happens with other editors I've tried.
Thanks,
Ben Crain
User 187934 Photo


Senior Advisor
19,949 posts
Online Now

Hi Ben,
Can you explain a little more? Which app are you trying to use? Can you provide a sample file?
Maybe we can come up with an alternative method.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 3086477 Photo


Guest
22 posts

Here are the current types of caps that Never-Slow Mode would enforce, as well as the limits for each:

Per-image max size: 1MB
Total image budget: 2MB
Per-stylesheet max size: 100kB
Total stylesheet budget: 200kB
Per-script max size: 50kB
Total script budget: 500kB
Per-font max size: 100kB
Total font budget: 100kB
Total connection limit: 10
Long-task limit: 200ms
There’s a lot more going on than simply limiting JavaScript. There are limits for individual resources, as well as their collective costs. The limit on connections, which I glossed over the first time I read the description, would be a very effective way to cut back on third-party content (the goal of Craig’s suggestion to WebKit). Finally, having a limit on the long-tasks ensures that the main thread is not overwhelmed and the browser can respond to user input.

It does seem to me that if browsers do end up putting a limit on the amount of JavaScript, they should consider following that lead and impose limits on other resources as well where appropriate.

Check with this.
User 379556 Photo


Registered User
1,333 posts

jimmy.wick90 wrote:
Here are the current types of caps that Never-Slow Mode would enforce, as well as the limits for each

Thanks for that. As far as I recall this is the first mention in these forums of Never-Slow mode, and it was instructive looking up about it.

So often in these CoffeeCup forums posts from guests are spam or irrelevant. It's refreshing to read useful information from you.

Regards,
Frank

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.