Closed Bug 276806 Opened 20 years ago Closed 19 years ago

myIpAddress() in PAC files induces large delays loading pages

Categories

(Core :: Networking, defect)

PowerPC
macOS
defect
Not set
minor

Tracking

()

RESOLVED EXPIRED

People

(Reporter: gerdes, Assigned: darin.moz)

Details

Attachments

(2 files)

This is somewhat related to bug: 231115 but that bug doesn't specifically
address the performance issue.

In short when the PAC file calls myIPAdress it makes the browser slow
considerably on every page that is loaded (pause and show the whirly thingy) and
it appears to be even more severe on some pages with many images.  This appears
to be the case in mozilla, firefox and camino.

In particular when I take the same PAC file and delete the line:

var ip = myIpAddress(); 

performance drastically increases.

My vague understanding is that this function is performing a DNS lookup on every
connection, though this could be totally wrong.  I realize that there are
problems caching this value in case someone changes the IP address they are
using but can't we just grab the IP address being used in whatever request is
being made at present.

In any case many users add a PAC file to access university resources and never
think of it again and instead believe that mozilla is slow and underperforming.
 Indeed I changed browsers as a result of this issue and only realized what was
happening when Camino suddenly became slow when I added the proxy auto config.
Assignee: general → darin
Component: General → Networking
Product: Mozilla Application Suite → Core
QA Contact: general → benc
for macos, myIpAddress is based off "hostname -s". Take that value and telnet to
it. Paste the output here.
(In reply to comment #1)
> for macos, myIpAddress is based off "hostname -s". Take that value and telnet to
> it. Paste the output here.
> 

Go figure

hostname -s returns my computer name (logicbook) and when I try to telnet to it
I get

--

logicbook: No address associated with nodename

---

On the other hand if I use just hostname I get back the value logicbook.local 
If I try to telnet to this I get:

--

Trying fe80:5::20d:93ff:feef:2a88...
telnet: connect to address fe80:5::20d:93ff:feef:2a88: Connection refused
Trying 172.16.1.37...
telnet: connect to address 172.16.1.37: Connection refused
telnet: Unable to connect to remote host

---

Does OS X not deal with hostname -s correctly?  Since I have done nothing weird
with my computer configuration I think this is probably going to be affecting
other people using OS X.
Can you post the file?

myIpAddress() should be a one time delay if you are assigning it to a variable.

I think there is some other ipv6 addressing issues as well.
This is the proxy file which causes the large delays
Attached file File with no delay
This is the proxy file after I modified it to remove the call to myIPaddress()
(might have mispelled that call).  This modified version does not cause any
slowdown hence my conclusion that it is the myIPaddress call which is slowing
it down.
(In reply to comment #3)
> Can you post the file?
> 
> myIpAddress() should be a one time delay if you are assigning it to a variable.
> 
> I think there is some other ipv6 addressing issues as well.

It was my understanding that it was *not* assigned to a variable.  I think the
entire js is run again on every page load, since before I noticed that it was
just the myIpAddress() causing the slowdown I was looking in to what would be
necessery to scan the .pac file and create some sort of data structure for quick
evaluation.  I may be very confused but I didn't think nearly any of this stuff
was computed beforehand and kept in variables.

In particular I thought there was a specific deciscion not to put the IP address
in a variable to deal with cases where people change IPs while keeping firefox
open.  I know I do this frequently with my laptop (and yes I tested this without
jumping between IPs)
yes, myIPAddress is now dynamically resolved.  it used to be evaluated once, but
that was changed recently.
Darin: I think for macOS, this is kind of bad, because of the way we get the
hostname and then reverse lookup.

I haven't looked a linux, it might suffer similar problems.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: