Webpage access by APM portal takes almost 10 seconds to load

Hello Im having an issue with a webapplication (on a iis server) that takes very long time to load through a portal (when its not in cache), the strange thing is that the page is quite small. I have looked with firebug and found that one js files takes 8.9 seconds to load, and 8.9 of that its “wating for response”. I did a tcpdump on the BIGIP and from what i can see there its quite confusing. There is a gap of like 8 seconds when the bigip dont do anything.

It does a http get and it seems to go fine (i get a http/1.1 200 ok), then for some reason it waits like 9 seconds before it does the next get request.

Make sure your logging for portal and access policy is not set at debug level, and that the data passing through is actually RFC 2616 Compliant -- has content lengths, or uses chunked encoding, or closes connection upon completion.

Also enable caching so that every single thing doesn’t have to be rewritten every single time.

I viewed the page with a firebug and saw that it a quite large javascript (35kb), that took really lo ng time to load, so i disabled javascript patchning and it worked much better. I do not have login to the webapp so i cant verify the functionality, i have asked the client to test. Not really sure if it could break any functionality by doing that.