Closed Bug 188006 Opened 22 years ago Closed 9 years ago

PAC: pauses while loading pages (complicated script #2)

Categories

(Core :: Networking, defect)

x86
All
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jvshop, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 After months of irritation and frustration trying to decipher the source of this bug -- http://bugzilla.mozilla.org/show_bug.cgi?id=155181 -- I stumbled upon the reason why only I noticed this problem. I have always had an automatic proxy configuration script located at some remote url, and EVERY TIME I LOAD A PAGE, the browser hangs for a few seconds. For some pages, it hangs multiple times and recovers multiple times. Sometimes the hang is 500 msec and sometimes it's 5 sec. Anyway, by some stroke of luck I happened to forget to configure my proxy server when I downloaded the newest build and now it works fine. So the problem is: With a remote automatic proxy configuration script, the browser is completely unresponsive every time a new page element is loaded from a different remote source. So the website listed above is a good example because it has multiple different advertising graphics, each loaded from a different server. I think what is happening is there is an initial freeze when the page is loaded as the browser tries to check with the remote proxy script to see whether the page should be proxied, then each time it comes across an element from a new source, it repeats the process. Since I can see my proxy script, I know that the pages I'm looking at do not actually get proxied by the remote server, but I bet Mozilla is checking every time anyway. Suggested solution: The browser should load the proxy configuration once at startup, then cache the information. When a page element comes from a non-proxied server, it should not access the remote proxy URL. Alternately, it should at least do screen writes while it waits for a response from the proxy host. Reproducible: Always Steps to Reproduce: 1. Go to Preferences->Advanced->Proxies and select "Automatic Proxy Configuration URL" 2. I use http://proxy.hosts.jhmi.edu/proxy.pac 3. Open any webpage Actual Results: Browser hangs for a few moments until (presumably) it hears from the proxy server that the page I'm viewing should not be proxied Expected Results: Cache the proxy configuration script and for non-proxied pages, bypass the remote proxy host.
-> PAC.
Component: Networking: HTTP → Networking
QA Contact: httpqa → pacqa
This, bug #180811, and bug #100022 all appear to be dupes or related to bug #83984. Since #100022 has the most votes, I'll add my vote there in the hopes that it will do some good. This bug will force my corporation to go to IE if it's not fixed soon!
Attached file captured pac file
I don't think this is the same problem discussed in the previous comment, I've attached the PAC file, and it loads a huge array and does shell expression for every domain in the array. I think what happens here is general javascript badness.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: With automatic proxy configuration enabled, browser freezes while loading pages → PAC: pauses while loading pages
It may be poorly written JavaScript, but Mozilla should cache the file upon startup (after expansion or whatever) and then not access the proxy server unless the user navigates to an address specified in the PAC file. I don't know how the other browsers work, but IE and Opera seem to handle it fine...
Jacob, are you sure we hit the proxy server? Looking over the PAC code we _do_ cache the PAC file.... I suspect that Ben is right and the issue is that FindProxyForURL() is called for each URL that may need proxying. And that implementation of FindProxyForURL is very slow.... As a test, try moving the declaration of ncl out of the function? I suspect that that will greatly reduce the hangs you see.
I was hit by this bug after installing similar banner zapper: http://www.schooner.com/~loverso/no-ads/ Mozilla slows to crawl (basically hangs) on every URL click, and then every 10 secs during page load.
Some observations of mine - 1) Mozilla 1.5 on windows doesn't suffer from this anywhere near as bad as mozilla 1.5 on linux does, in the same office environment (ie. same proxy server etc etc). Mozilla on linux is very tedious for me to use, but I use mozilla on winxp without too many hassles, even though they both use the same .pac file. Typing in a manual proxy setup on the linux version 'fixes' the problem, so looks like something about the .pac stuff it doesn't cope with. 2) Konquerer using the same .pac setup on the same linux box works well. 3) I installed firebird 0.6 to cross check with it, and it doesn't seem to suffer from this problem on the same linux box either - so this problem looks peculiar to mozilla only.
Trevor, the PAC code in Firebird and Mozilla should be absolutely identical. Is this a problem with a clean profile? It sounds like you have some preference setting that leads to this behavior.... (and hence not seeing this bug, which is not dependent on any particular preferences).
yes, whoops, sorry. My lack of testing. Firebird does the same thing as mozilla. I installed firebird and tested it for about 15 minutes of surfing, which normally the problem occurs heaps of times, but murphy came along and hid the problem. I just spent another 15 minutes surfing in firebird and the problem arose just like in mozilla. So diregard my comment about firebird.
can this problem be reproduced with a recent trunk build? trevor: can you please download a nightly build of mozilla and report back on how it performs under linux? thx!
Yes - I installed the nightly build 2003102705 onto the box and it exhibits the same symptoms. I'm a little strapped for time for the next couple of days, but I will do some more detailed testing soon.
trevor: when you do get time, could you please provide a HTTP log via: http://www.mozilla.org/projects/netlib/http/http-debugging.html thx!
Summary: PAC: pauses while loading pages → PAC: pauses while loading pages (complicated script #2)
Assignee: darin → nobody
QA Contact: pacqa → networking
Darin in comment #13 > trevor: when you do get time, could you please provide a HTTP log via: > > http://www.mozilla.org/projects/netlib/http/http-debugging.html > > thx! Darin, Trevor appears to be gone, and reporter too.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: