0

Caching and Performance

asked 2006-03-19 12:49:52 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3637923

By: oberinspector

In the most web applications only some users create and update content and need a rich user interface to do that... but the most users only view content and probably decide to get active later...

In my application almost all information - even navigation - is build up from database content... one displayed information root element (a page in the meaning of zk...) has an unique DB id (long) and can access other related child information elements from db and place this information in components inside the page...
like the picture in the ZK usergide chapter "The ID Space" i can build up and maintane a hierarchical information strucure in my db... and ZK seems to be very good choice to build up a page from this... the backdraw of this comfort might be a bad performance because of always access the database... as mentioned in another thread in the forum...

database content changes rarly and only with the long DB id of the root element (and probably a lokale) i will have always exact the same render result in my page content...

as i understand zk, page content is build up from all included components recursively and every time an interactive ui element is detected an event handler is installed in the server... the render result is build up in one large string and is send to the client...

would it be possible to cache the render result in an object, which includes the render result string and a list of event handlers to install? So when a Page is requested the first time for a DB id and a locale, the page is build up normal in the "ZK" way and by accessing the database... afterwards the above mentioned render result and the list of event handlers is stored in a (application
wide) cache after the result is send to the browser. Next time a user accesses the same page the cached render result is used and sent immediately to the cliend and afterwards the related event handlers are installed in the server.

There are some caching systems like JCS (they say, they are very fast...) and ehcache which might be used and integrated in ZK...

probably there is already something like this implemented in ZK, but as i understood the threads this was only used for *.zul files... (?)

regards thomas

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2006-03-19 13:11:30 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3637948

By: tomyeh

Yes, ZK compiled ZUML pages into an immediate format called com.potix.ui.metainfo.PageDefinition. It is done by com.potix.ui.http.Definitions.
However, it assumes the resource is locatable by ServletContext for locating taglib (which is required only if you use special function in EL expression).

I agree what you said in the post. And, I'll modify it to make it independent of ServletContext. In fact, I shall make it depends on WebApp (which is a good encapulation from HTTP). Wait for next release.

link publish delete flag offensive edit

answered 2006-03-19 13:36:19 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3637964

By: tomyeh

My bad memory! The encapsulation is alreay there: use
Execution.getPageDefinition()

link publish delete flag offensive edit

answered 2006-03-19 16:12:12 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3638116

By: oberinspector

sounds fine! i will have a look... but first i think i have to learn some more zk basics...

thanks!

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2006-03-19 12:49:52 +0800

Seen: 597 times

Last updated: Mar 19 '06

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More