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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 29 2025 14:41:05
Script start
Timing: Jan 29 2025 14:41:05
Module start 'layout'
Timing: Jan 29 2025 14:41:05
Module start 'content'
Timing: Jan 29 2025 14:41:05
Module end 'content'
Timing: Jan 29 2025 14:41:05
Script end

Main resources:

Total runtime0.0595 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 588.1328151.2109
Module start 'layout' 0.00750.0036 739.343836.6719
Module start 'content' 0.01120.0468 776.0156107.3438
Module end 'content' 0.05800.0014 883.359445.9766
Script end 0.0594  929.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00233.8156140.0002
Check MTime0.00101.6071140.0001
Mysql Total
Database connection0.00132.155510.0013
Mysqli_queries0.00427.046630.0014
Looping result0.00000.022010.0000
Template Total0.00101.710.0010
Template load0.00081.266010.0008
Template processing0.00020.390110.0002
Override
Cache load0.00050.827410.0005
General
dbfile0.035659.783880.0044
String conversion0.00000.013240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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