Red Hat Bugzilla – Bug 697590
full page reload in IE when clicking on top menu items or on most hyperlinks
Last modified: 2013-08-05 20:39:19 EDT
Description of problem:
In IE8 and 7 there is pretty bad performance when clicking on top level menu items like Bundles, Administration,etc. It looks like each top level menu selection causes a full F5 application refresh where the entire page (including shared menu) is rebuilt on each selection.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Using IE8 or IE 7, log into RHQ and wait for all page loading to complete.
2. Click the 'Bundles' link and then the 'Administration' link and pay attention to the time that passes before load is complete.
3. Make a note of whether the entire page is reloaded.
-IE8 can take 9s to load pages while Chrome and FF load the same pages in 1s.
-IE7 can take 90s to load pages while Chrome and FF load the same pages in 1.5s.
Comparable load times on IE as with other browsers.
- We should check to make sure there isn't a different IE profile that needs to be loaded/added during smartgwt compilation that is dramatically affecting performance here.
- We should add browser cache deletion to testing here to see if that affects performance here as well.
The above results were recorded using two different client boxes point as same external server:
Windows 7 IE8 (8.0.7600.16385)
Windows XP IE7 (7.0.5730.13)
removing FF perf comment, new issue is in https://bugzilla.redhat.com/show_bug.cgi?id=697699
documenting that i have been testing with IE 8.07600.16385 and have not seen the performance issue clicking on top level menu items.
I checked in a possible fix for this - [master a5c3401]. Simeon, can you give it another try w/ HEAD?
No difference. Same performance on IE 7 and 8 as before. Clicking on top menu items and some links(Res/Group>Monitor>(host)) still result in full page refresh each time. I build for all platforms IE6,IE8.
Anyone besides mike tried this?
This is due to a well-known IE bug. GWT works around the bug if you use its history API to change the fragment portion of the URL. However, if you use raw HTML, as we are doing in MenuBarView, you don't get the GWT workaround magic. The best way to resolve this, would be to convert the raw HTML in MenuBarView to GWT widgets. However, if we don't want to undertake that right now, the following provides a number of workarounds that can be used to make raw HTML links work in IE:
Note, this is going to be an issue on IE in a bunch of other places throughout the GUI, not just for the menu bar. There are many grid and form fields where we set the value to raw HTML in order to output links.
The raw HTML could be replaced with GWT widgets as follows:
- replace StaticTextItems that need to contain links with CanvasItems
- for grids that need to have one or more columns whose values are links, subclass ListGrid and override createRecordComponent() (see http://www.smartclient.com/smartgwt/showcase/#grid_cell_widgets for an example)
- for Labels, make sure the content does not contain raw links; if the whole Label is meant to be a link, use a click handler; if only part of the label should be a link, perhaps add another Label as a child of the outer Label, and add a click handler to the inner Label
- for other places which use GWT's HTML class or SmartGWT's HTMLFlow class to insert raw HTML as MenuBarView does, replace the HTML or HTMLFlow with GWT widgets
With Ian to try out each type of GWT widget fix described in comment 7 on a branch of master
[master 4c0c992] adds a magic Event.NativePreviewHandler that makes anchor tags not reload the whole page in IE. This fixes all of the links in the app, but does not fix the top menu items, since they are not currently implemented as true links / anchor tags.
My next step is to merge in some of my widget work from the ie-fragment-fix branch to get rid of many of the raw HTML links, with the large exception of links within ListGrids/Tables, which will be kept as raw HTML because we encountered too many issues with using the ListGrid.createRecordComponent() API to define custom Canvases for table cells.
[master b4c21e] re-implements the top menu bar using SmartGWT widgets, rather than raw HTML.
The Event.NativePreviewHandler and the new widget-based top menu have also been cherry-picked into the release-4.0.0 branch for inclusion in RHQ 4.0.1.
verified RHQ 4.0.1 from IE8.
Bookkeeping - closing bug - fixed in recent release.