[Yanel-dev] Loading yanel toolbar menus asynchronously

Guillaume Déflache guillaume.deflache at wyona.com
Tue May 12 13:27:14 CEST 2009


Michael Wechner schrieb:
> Guillaume Déflache schrieb:
>> Michael Wechner schrieb:
>>> I have a toolbar sub-menu which does not scale well for whatever 
>>> reason and it is hard to improve, and hence
>>
>> I guess if the menus are so big that it becomes a performance problem, 
> 
> this could be one problem, but in my case it's not about becoming big, 
> but that some pre-condition checks need to be done (access control, 
> etc.) which can take some while
> depending on the setup
>> they also probably are a usability problem as well, which no 
>> optimisation would solve anyway!
>> Unless it's a "combinatory explosion" problem, that you have 10 menu 
>> entries, each having 10 menu entries, each of thoise having 10, etc. 
>> (like what probably happens now to a lesser extent in Yanel with the 
>> revisions submenu) Is that it?
> 
> in the case of the revisions submenus the workflow conditions need to be 
> checked for example, and this can contain all kind of checks and hence 
> might take some seconds.

I am wondering if doing the following would solve some of your problems:
- simply loading the whole thing as if you had all rights
- hide the actions you have no rights for in the background using AJAX 
sending other HTTP requests to get the actual permissions (we would only 
do the checks for the menu bar in the 1st request)
- there should be no security issues as it would only be about hiding 
menu entries that would otherwise lead to a "access denied" page, so 
that's a kind of "graceful improvement over time"! ;)


> You know it's not about minutes, but I think even 5 seconds are too long 
> nowadays.

Sure, BTW http://www.useit.com/papers/responsetime.html is a must-read 
on that.


>>> it would nice if one could load specific toolbar menus 
>>> asynchronously. I mean the menu is only actually loaded if
>>> one clicks on it.
>>>
>>> Any idea how we could best implement this? I guess it needs two parts:
>>>
>>> - Client side javascript
>>> - Server side API for retrieving menu content
>>>
>>> WDYT?
>>
>> Makes sense. Might also be the occasion to also think about I18N and 
>> Java API (we would only really need a ReSTy HTTP API for your current 
>> problem) for the menus.
> 
> maybe we can workout some proposal. It doesn't mean we have to implement 
> it right away, but at least write down our ideas and keep it in mind for 
> the beginning.

This may still be useful, but I wonder about accessibility issues if we 
start using Javascript for the menus... :/

Also Michi BTW maybe you remember what you meant with this "need CSS 
menus" bug: http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=5196


More information about the Yanel-development mailing list