MultiThreading? Javascript problems...
First let me begin by saying I know zip-zero-zilch about Linux (or unix).
I have a nice javascript I wrote on my PC that runs very smoothly when viewed from localhost. I've put it on other servers and it runs smoothly as well. I put it on the server I wrote it for, a Linux RedHat, and it crawls, taking up 50% of the CPU for a web-browser to view the page. I thought it was a javascript problem, but when I asked for help, this is the reply I received on the problem: Quote:
http://stackoverflow.com/questions/1...-red-hat-linux http://www.acme.com/software/http_load/ etc, and seems there's a problem with RedHat and single-threads? Does this sound right to the experts on here? I need to write to the Tech group that controls the RedHat machine, if it is true, and have them fix it. But, need to know what to say to them, since, unless you give them very specific instructions, they tend to reply with a blank-stare and a not-our-problem attitude (otherwise I know they're just going to say it's the javascript, not their RedHat, which is the most perfect OS ever, that's the problem). Can anyone help? |
Quote:
Unless your javascript contacts the server itself (with AJAX type calls) it runs ONLY in the browser - the server has no effect on its execution, except to deliver it to the browser when the page is viewed. UNLESS it then goes off by itself and again calls the server. Quote:
This is not universal, it depends on how the system is set up and how the controlling process is written, and / or how the hosting server is set up. But that does sound strange, forking is usually trivial to do, I think? Quote:
Quote:
Again, unless your Javascript does something where it deliberately interacts with the server, like repeated AJAX calls through spawned HTTP objects. In that case, the server CAN have a direct impact on a Javascript script's performance "in browser". Quote:
|
Quote:
Quote:
But if it's not the OS (which from a logic point-of-view, seems improbable), and not browser based (which, since it only crawls from the RedHat server, makes sense), what else is there? o.O |
Ouch... ok, what exactly does your script do, or what is it supposed to do?
How does it do what it does? Maybe if you post some more info, some real guru could help as well. (I'm just a wannabee!) |
http://i-sphynx.com/dev/
That's a working, non cpu-intensive server, copy of the page that locks up all browsers when placed on the RedHat server. Any other info that you may need, you'd probably have to tell me how to get since it would be about the linux-setup I think. |
Ok, I'm not sure how/why, but I have one further piece of the puzzle....
if I go to the www.<domainname>.com site, no CPU usage.... if I go to the <domainname>.com site, the CPU sky-rockets. I guess this means it could have something to do with the stream, with the dmz, the firewall? I'll need to redirect anyone that comes in to the <domainname>.com site towards the www.<domainname>.com site as a 'fix', but I'm still very curious as to what the actual problem is... o.O |
Well, nicely done script! The URL you sent works just fine here.
Construction worker porn... ;) If that solves your problem, sure, it seems like a legitimate solution - albeit illogical, but then, the problem itself is illogical. It might somehow be a DNS issue as well, are you sure www.domainname.com and domainname.com resolve to the exact same address? |
All times are GMT -5. The time now is 06:20 AM. |