Fusion creates a Javascript loop at page startup. Garland and other themes do not. I have a subtheme of Fusion that is Fusion starter theme with some CSS colours changed. When a page is loaded, the page finishes loading then Firefox locks up for 10 seconds in a Javascript loop. The error occurs in several versions of Firefox, including Firefox 5, and there are people reporting similar problems in other browsers.
Jquery has had similar problems before with some versions. I replaced the Drupal 7 supplied Jquery 1.4.4 with 1.6.2 and the loop became one second shorter. 1.4.4 timed out frequently because it was running over 10 seconds. 1.6.2 does not time out because it is a fraction under the default Firefox 10 second timeout.
I tried several other themes before Fusion and none created the problem. I switched to Fusion because some of the other themes had minor problems when used as a base theme. Fusion was easier to set up but adds 10 seconds to every page load including cached anonymous pages.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | Screen Shot 2011-08-06 at 6.22.41 AM.png | 18.2 KB | aquariumtap |
Comments
Comment #1
esmerel commentedHow odd. I've never noticed any difference in page loading. Can you maybe use the javascript console to see what's taking so long (I'm not sure if this is possible, but it's potentially worth attempting)?
Comment #2
aquariumtap commentedI've never seen this, either. Do you happen to have a public version of the site that I might take a look? Is this a fresh installation, or a developed site? Fusion comes with very little JavaScript, and none of it is used by default. One is the equal heights script, which will stretch blocks vertically to be the same height as one another; the other is used to overlay the grid, something that's used only in development.
Comment #3
peterx commentedI will test with the Javascript stuff in Firebug when I return to the city next week.
Comment #4
esmerel commentedSounds good - if you come up with anything, please set the issue back to active!
Comment #5
peterx commentedStill happens with alpha 2. Try any page at http://petermoulding.com/. The delay is 10 seconds or more when I have a superfish menu active, 1 or 2 seconds when I do not have a superfish menu active, and nothing when I switch back to Garland.
There are a couple of hundred menu options when they are all expanded for Superfish. There was no delay with Superfish menus in Drupal 6 with a Genisis based theme or any of the ten odd other themes I tested with Superfish. I never tried Fusion with Drupal 6.
The site is upgraded to Drupal 7.7 with whatever jQuery is in Drupal 7.7. There are no errors in the Firefox error console.
Comment #6
peterx commentedI installed Firebug, Firebug reported some minor CSS errors, I fixed the CSS errors, and the timing did not change.
Comment #7
esmerel commentedStrange - I get 3 or 4 seconds, but not 10 (maybe anonymous page cacheing is shortening the time for me and my laptop's wireless is pretty bad). Not sure what's slowing things down here; I'm not seeing any issues related to slowness in the Superfish queue. Maybe aquariumtap will have a good idea.
Comment #8
aquariumtap commentedHi peterx, I'm not seeing 10 second delays, but it's not snappy, either. Superfish is not included with Fusion 7.x, it's handled by a separate module/library, so I'm not sure this is the best issue queue. That said, I noticed a few things that might impact performance:
Hope that gives some clues...
Comment #9
peterx commentedI am using Firefox 5 in Linux on a netbook in the middle of a tropical jungle. I noticed the same problem with earlier releases of Firefox on both Windows and Linux when I was back in the office. Firefox javascript processing uses only one processor of a multiprocessor chip and is entirely dependent on the clock speed of the one processor. My processor is 1.5 GHz and takes 10 or 11 seconds for the Superfish menu. Firefox times out the Javascript at 10 seconds and produces a message about a script taking too long or produces a message about the web site not available if the Javascript processing runs for long enough to make the page hit 20 seconds.
Firefox 5, and I think 4, shows a rotating download symbol that is grey when waiting for a reply then orange during the replay download. The orange rotating symbol freezes when the javascript is processing. A page request might be 2 seconds of grey rotating, 3 seconds, of orange rotating, then 10 seconds of orange frozen.
A fast modern desktop processor would process the Javascript twice or three times as fast, giving you 3 seconds. Good for the desktop but not netbooks, smartphones, lower cost notebooks, or any of the Dells I tried in customer's offices.
I switched Javascript aggregation off when testing jQuery 1.6.6 and have switched it on again. The orange rotating bit is the download and drops from 2 seconds to 1 second with aggregation on. The orange frozen bit is the Javascript processing after the download and does not change with aggregation. The download time is about the same before and after aggregation because the Javascript files are cached.
I stopped watching the crocodiles long enough to install Firebug. Firebug Javascript debugging slows the Javascript down to 25 seconds and usually reports an error in jquery applying something to the menus. I will look at the way Superfish identifies the menu.
Comment #10
peterx commentedThe following code appears twice. Could Superfish processing be duplicated and double the processing time?
Would it be caused by the use of a subtheme?
Comment #11
peterx commentedI reported the duplicate inline Javascript in http://drupal.org/node/1241188 and implemented a quick workaround in the same issue. superfish_contents() appears to fire twice and create the same inline Javascript each time. My temporary fix stops the duplicate inline js.
Comment #12
aquariumtap commentedHI peter, did you investigate the error at the bottom of every page on your site? It's not just superfish that's duplicated. The html, body, head, etc tags along with all of the script tags are generated to display the error.
Comment #13
peterx commentedThere is no 500 Service unavailable server error and "The website encountered an unexpected error. Please try again later." is not appearing on my site when I browse it with Firefox. Both my Ubuntu machines have Firefox 5. What browser are you using? How fast is your processor (because that impacts timeouts)?
I also switched off the advertising block because that introduced a small variable delay.
Comment #14
aquariumtap commentedHi peter, I see the error with Safari, FF and Chrome. Perhaps something is referencing your localhost. Try temporarily shutting down any locally running apache/mysql services.
Comment #15
peterx commented@aquariumtap, I could not reproduce the error on my computers using Firefox 5. I found one of the errors on a computer using Firefox 3. Switching on and shutting down Apache made no difference. There was no difference based on entries in the hosts file. The only difference I could find was the error occurring in Firefox 3 but not in Firefox 5.
I am working on some projects using themes based on Zen. I switched the site to use Zen as the base theme and all the problems disappeared in Firefox 3. The duplicate Superfish problem also disappeared.