I have a problem where on page load (after a certain number of .js or .css files) the files are taking way too long to load. At first I thought that the issue must be inside the .js files, but later I realised that the content is irrelevant, I tried deleting the content of the .js files that took too long to load and the issue was still there.
I also realised that if I change around the order in which the files are loaded then the one(s) I leave for last are always the one(s) that take very long to load (this load time differs from PC to PC, on mine it's 5-6 seconds, on another one it's 19-20).
I'm currently using Apache 2.4 for development and I suspect that the issue must be in the settings somewhere.
You can see the issue here:
Any help would be appreciated.
Best Answer
The situation is rather strange. My suggestion is to profile your application client side and try to understand what is going on.
Generally the problem could depend on:
A locally cached content that is very slow to be read, this should not depend on a particular file corruption since the files being slow depend on the sequence you put in the JS referencing.
A rendering problem on the client (though this should not change on the sequence of the referenced items)
A possible problem of parallel transfers on your apache server. This could imply that you have a truckload of files to be taken with different GET operations and Apache cannot serve all of them in parallel. Therefore a serialization could occur with the effects you are experiencing.
Different ways to get the same files, possibly opening another worker on apache (i.e. main page through direct IP to Apache, JS over proxy pointing to the same Apache. And Apache being configured in a single worker scenario (I don't enough information to judge it)
A damn antivirus acting locally which triggers on the browsers loading operations
My advice is to do the following:
At the end of the profiling you will notice which is the cause of serialization of the process.