0

ZK App run slow in a Citrix like environment

asked 2008-11-19 08:51:01 +0800

robinbak gravatar image robinbak
42

I have an ZK app that runs very fast om my laptop and development machine, but very slow in a Citrix like environment.
The problem is caused because it takes ages to download all the (very small) images like MyApp/zkau/web/zul/img/button etc.
I tried the cacheable="true", but no effect.

I there anything I can do to to speed the downloading of the (internal ZK) images?

thanks in advance.

delete flag offensive retag edit

7 Replies

Sort by ยป oldest newest

answered 2008-11-19 09:29:41 +0800

hkn gravatar image hkn
246 3

Hello,

I have a similar problem. Here it are not the images but inactivating when opening a modal dialog
is very slow and you can see every row of pixels being invalidated.
Additionally the dialog borders change their color very slowly. It is possible to work with the app,
but its speed is beyond expectation.

In my test the terminal server was allmost idle and the available bandwidth
per terminal session is limited to 512 kbit/sec. But normally that is not a limitation.

Maybe there are some configurations to control|reduce the animation??

Thanks

Horst

link publish delete flag offensive edit

answered 2008-11-20 10:37:32 +0800

robinbak gravatar image robinbak
42

I can image that all ZK internal images (just a few pixels) are 'downloaded' from a resource that is downloaded once at startup by the browser.
Is it possible to setup ZK to do just that

link publish delete flag offensive edit

answered 2008-11-20 11:26:33 +0800

robertpic71 gravatar image robertpic71
1275 1

1.) Check this thread for disable the window animation.

@robinbak
2.) do you use tomcat directly - or via apache connector?
There is smalltalk about the connector. Look at the end from the smalltalk. There is way to let apache serve the static data.

But (this is my opinion) this could not work for the internal images - because they are served by a servlet. I

Some solutions could be:
1.) Create your own theme (extract with theme-util) and externalize the static data. Served from a webserver you could set cachesetting (i.e. 2 hours).

2.) Post a feature request
It should be possible set cachesettings for static data (zkau/web).

/Robert

link publish delete flag offensive edit

answered 2008-11-20 12:07:45 +0800

hkn gravatar image hkn
246 3

@Robert

I set Window.setDefaultActionOnShow("") as written in the thread and tried the zk.xml entry too, but without any success. Via terminal it still takes a few seconds do deactivate the background and the users gets control over
the modal dialog. I recognize that there is no animation of the dialog anymore, but the background windows are disabled and become gray. The way that happens seems to slow down the terminal session. why? i have no idea.

Regards

Horst

link publish delete flag offensive edit

answered 2008-11-21 02:35:30 +0800

PeterKuo gravatar image PeterKuo
481 2

@robinbak
Image of ZK components are cached by browser.
Maybe you can check your browser's setting.

Like Developer's reference says, cacheable is for DHTML.

cacheable
[Default: false if Ajax devices, true if XML and MIL devices]
It specifies whether the client can cache the output.
Note: Browsers, such as Firefox and IE, don't handle the cache of DHTML correctly, so it is not safe to specify cacheable with true for Ajax devices.

@hkn
Sorry for your inconvinient, but there is no way to close other effect besides animation.

Please post it to feature request.

link publish delete flag offensive edit

answered 2008-11-21 08:22:51 +0800

hkn gravatar image hkn
246 3

feature request submitted here:
http://sourceforge.net/tracker/index.php?func=detail&aid=2319822&group_id=194261&atid=948723

link publish delete flag offensive edit

answered 2008-11-21 09:24:32 +0800

robinbak gravatar image robinbak
42

As an experiment, i modified the theme and replaced all instances of:
background-image : url(${c:encodeURL(c:cat3('~./',project,'/zk/progress2.gif'))});
with:
background-image : file:///g:/temp/img/zk/prgmeter.gif;

and created a new myzktheme.jar file, and put this in WEB-INF\lib

Next i copied all the images in the Citrix to the "g" drive.

The result was a major performance boost, although still not as fast as on my local machine, but acceptable.

What i want to propose is that images could also be download with a syntax something like:
background-image : getCachedImageOnClient('img/zk/prgmeter.gif');

Where getCachedImageOnClient() gets the image from a Map<String, Image> that is initialized at startup.
This would give a huge performance boost.

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: 2008-11-19 08:51:01 +0800

Seen: 397 times

Last updated: Nov 21 '08

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