Maximum size of the pac file? Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Enobarbous
Moonbather
Moonbather
Posts: 50
Joined: 2022-12-06, 17:44

Maximum size of the pac file?

Unread post by Enobarbous » 2024-02-13, 15:59

Not sure, this is a topic for this section, so please move it if I'm wrong...

The question is exactly the same as in the topic title - what is the maximum size of a pac file for PM?
I tried to install an automatically generated pac file of a large size - 3.66mb (nothing exceptional, just to bypass blocking. Yes, the list of proxied domains is so large :| ) and received an error:

Code: Select all

PAC file failed to install from file:///c:/1.pac
PAC Execution Error: uncaught exception: out of memory []
When I reduced the file size for a quick test (reducing the number of domains without touching the rest of the syntax) to 1.5mb, it installed and worked fine.
For clarification: I know about ways to optimize pac, the current list of domains is redundant for me and the final version will not be so big - I just would like to know the limit of the size of the processed file. For Chrome it's about 1mb, for FF the size is unlimited (this 3.66mb file works fine there), but for PM?
I am sorry for the use of auto-translator to post

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: Maximum size of the pac file?

Unread post by therube » 2024-02-13, 16:24

Not an answer, but a possible work-around is mentioned in Large PAC file doesn't seem to work properly (& there's even a link there back to PM ;-).)

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35652
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Maximum size of the pac file?

Unread post by Moonchild » 2024-02-14, 03:34

You shouldn't be using a pac file this way. pac files are meant to auto-configure specific proxy use for limited networking segmentation, not for filtering or what have you. You are simply running out of memory for the JS runtime if you try to load a huge pac file. You can work around it by giving the JS engine runtime a disproportionately large heap space for internal use (a runtime itself should not need this) but it's not a solution and will impact overall browser memory use exponentially.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Enobarbous
Moonbather
Moonbather
Posts: 50
Joined: 2022-12-06, 17:44

Re: Maximum size of the pac file?

Unread post by Enobarbous » 2024-02-14, 15:42

I just felt like I should have figured it out on my own instead of asking...
Okay, in case anyone needs the same information, the maximum pac file size that PM33 was able to install is about 1.79mb (1 878 135 byte +- slightly)
Moonchild wrote:
2024-02-14, 03:34
You are simply running out of memory for the JS runtime if you try to load a huge pac file.
I understand the reasons, I just needed to know the processing size limit. Well, I found it out - experimentally :)
I am sorry for the use of auto-translator to post