Forums / General / better subitems display in 4.4 admin

better subitems display in 4.4 admin

Author Message

Marko Žmak

Sunday 03 October 2010 4:28:25 am

In admin interface of Fuji, the subitems of a node show up really slowly, I have to wait for 4 - 5 seconds before they show up.

Also there are some reports of subitems not working at all:

http://share.ez.no/forums/general/4.4-does-not-display-subitems-in-admin

Naturally, this is because the subitems are fetched via an Ajax to ezjscore that returns the JSON with the subitems list.

What do we really get by loading subitems via Ajax when the page loads for the first time? Nothing, except a confused user that has to wait few more seconds before getting the subitems. And it gets really annoying when doing a lot of operations on subitems.

Of course, when doing the pagination or changing the sort order of the items, this speed up thing, but when loading the page for the first time it just slows down.

So the right solution would be:

- when loading the page for the first time display the subitems directly, without the additional Ajax call

- when clicking on the pagination, or changing the sort order, change the subitems list via the Ajax call

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Tuesday 05 October 2010 9:40:00 am

Arghh... This is awfull... Having to wait for 5 - 10 seconds just to display the subitems...

Am I the only one that finds this frustrating and not usable???

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Damien Pobel

Monday 11 October 2010 4:46:55 am

Hi Marko,

I've just upgraded an existing site to 4.4 but I do not have the problem of slowness you encounter. I think you should try to load the site in Firefox with Firebug enabled and look at the Network tab to see what is so long. In fact, the loading of this part is done in several step :

  1. the page is loaded
  2. when the document is ready, the YUI loader component loads several CSS and JS files. Depending on your configuration, those files are fetched from the eZ Publish site itself or from a remote CDN
  3. then a YUI component builds the table by loading asynchronously a json document

Btw, there should be a GIF spinner ou a simple message telling to the user that something is loading.

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Marko Žmak

Tuesday 12 October 2010 3:18:47 pm

Damien, the YUI components is loaded from the eZ site, and the problem is that loading of the JS files takes a long time. See here:

http://www.studioartlan.com/subitems_fetch.jpg

And I found another problem... When I set:

Cache-control: "max-age=86400, must-revalidate"

the subitems are not displayed at all.

But regardless of what the reason for this is, I still think that displaying the subitems the first time should not be made via Ajax, but displayed directly in the HTML.

A lot of problems could come from this Ajax approach.

For example, what about browsers that don't have Javascript? Do we really want to have such a compatibility break? Even Gmail still has a HTML only version of the page.

And I for example from time to time have the need to use the admin with a non JS browser. And now the admin is completely useless for this case.

Cache-control: "max-age=86400, must-revalidate"

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Saturday 16 October 2010 8:47:44 am

OK, I have investigated further. It seems like the browsers don't cache properly the JS and image files. So they are loaded again on loading of the page. An that's where the delay occurs.

I have measured the loading of the subitems and inspected the traffic with Fiddler and here are the results:

Browser
Duration (first time)
Duration (second time)
Duration (after refresh)
Loading from cache
Firefox
8 sec
8 sec
8 sec
nothing
Safari
10 sec
10 sec
10 sec
nothing
Opera
7 sec
1 sec
7 sec
everything (JS, CSS, images)
Chrome
10 sec
4 sec
4 sec
only some JS files

Note that only Opera caches everything and works OK on next loading of the page.

I have measured the time from when the "Subitems" text is displayed, until the table with subitems is displayed. Here are the conditions for each test:
first time - all the cache cleared and page loaded
second time - typing the URL again in the address bar after first time
after refresh - hitting the browser's refresh button after the second time
I have checked out with Fiddler and all the static items (JS, CSS, images) have the cache headers properly set, so that they get cached:

Last-Modified: Tue, 28 Dec 2010 08:57:40 GMT
Cache-Control: max-age=604800, must-revalidate
Expires: Mon, 15 Nov 2010 12:49:47 GMT

But as we can see the browsers still refuse to cache them.

This is very strange because all my browsers are installed with the default installation and I didn't change their cache settings.

Anybody has any clue what could be the problem?

P.S. It seems to me that a lot of potential problems could come from this ajax approach of fetching subitems...

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Christian Pfeffer Gjengedal

Monday 18 October 2010 12:19:41 am

Neither of us at eZ dev or QA have seen this before....

Do you have the same caching problems loading http://developer.yahoo.com/yui/examples/datatable/dt_basic_clean.html ?

Nicolas OTTAVI

Friday 08 April 2011 1:35:40 am

Hi

I got similar problems. I thought it was may be due by the fact I was using FF 4 on Mac, then I've tested on another browser on PC, problem is the same.

Furthermore, I have another issue: The sensitive context menu on t he "tool icon" is not displayed, while the one in left tree_menu does work.

NO

--EDIT--

The second point seems to be a bug which has been corrected since (issue 017355 )

Christian Pfeffer Gjengedal

Friday 08 April 2011 4:28:20 am

Nicolas, it would be great to get more info about your environment.

  • Does this affect caching of all images and JS files, or just a subset?
  • Any other files that aren't cached as expected?
  • What version of eZ Publish is this?
  • What happens if you enable the Packer setting for ezjscore?
  • What happens if you set ezjscore.ini's LoadFromCDN=enabled ?

BTW: eZ Publish 4.5 has a debug section for ezjscPacker that may come in handy for debugging purposes.

eZ debug

Timing: Jan 29 2025 13:38:26
Script start
Timing: Jan 29 2025 13:38:26
Module start 'content'
Timing: Jan 29 2025 13:38:26
Module end 'content'
Timing: Jan 29 2025 13:38:26
Script end

Main resources:

Total runtime0.1815 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.9453180.8438
Module start 'content' 0.00660.0069 768.7891111.0703
Module end 'content' 0.01350.1679 879.8594538.7813
Script end 0.1814  1,418.6406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00331.8307200.0002
Check MTime0.00120.6772200.0001
Mysql Total
Database connection0.00060.345610.0006
Mysqli_queries0.119665.90011410.0008
Looping result0.00130.69011390.0000
Template Total0.167392.210.1673
Template load0.00080.461310.0008
Template processing0.166591.740310.1665
Override
Cache load0.00060.311910.0006
Sytem overhead
Fetch class attribute can translate value0.00100.549310.0010
XML
Image XML parsing0.00030.148910.0003
General
dbfile0.018910.4048200.0009
String conversion0.00000.003930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs