0

zul pages cost huge Memory usage

asked 2009-09-14 05:29:26 +0800

cryandaguo gravatar image cryandaguo
72 2

updated 2009-09-14 05:29:44 +0800

Hi All,
I met a terrible problem in my zk project.
The zul pages cost huge Memory usage when in IE6.0
take "zk Forum" as example. open zk Forum in IE6.0 and then click the navgatgion to each sub forum. the memory usage will increase all the time during your operations.
Your every operation in "zk Forum" cost some increasement in memory but it will never go down.
My project is under ZK3.6.1 and some of my zul pages are complex with listbox, grid, trees and some other big zk components.
the increasement of memory in my zul pages are very huge and it can not be tolerated.
in some of my complex zul pages, the memory can easily go up to 400mb memory usage after some click and update events.
then the whole IE page became very very slow and can not be used.
is there some possiblity to address this issue?
and I used Iframe.setSrc() and Executions.getCurrent().createComponents() to navigate zul page one to another.
does these 2 ways cost lots of memory? should I use sendRedirect() to navigate the whole page not part of the page?


I liked to use ZK very much, it is very friendly to developers and can be easily learned and introduced into projects.
I got lots of excellent ideas to implement ZK in my projects only if this IE memory issues can be settled.So please help!

delete flag offensive retag edit

7 Replies

Sort by ยป oldest newest

answered 2009-09-15 06:25:20 +0800

cryandaguo gravatar image cryandaguo
72 2

Is there anyone can help me ?
Or I haven't describe it clear enough?

link publish delete flag offensive edit

answered 2009-09-16 08:18:51 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

@cryandaguo

Hi, cryandaguo. Have you check the problem in another browser?

Iframe.setSrc() and Executions.getCurrent().createComponents() shouldn't cost that much memory
to make user feel slowly. But it's definitely hard to say, there're a lot of variables will make this happened.
(ex. too much javascript...)

The only absolutely thing is hight freeze memories, it's because of browser will cache something, not cause
by using zul, jsp, asp or any other type of web pages.

Maybe you can check your code and find out which one will let browser cache these memories, and share
some codes at here. Perhapes we can help you.

Regards
/Joy

link publish delete flag offensive edit

answered 2009-09-16 09:10:07 +0800

cryandaguo gravatar image cryandaguo
72 2

updated 2009-09-16 09:19:48 +0800

Hi Joy,
Thanks very much for you help.I had not describe it clearly enough. I shouldn't use the word "cost".
What I want to say is that the memory usage for zul pages will increase all the time during your operations and it will never go down.
you can take "zk Forum"(http://www.zkoss.org/forum/index.zul) as example. open zk Forum in IE6.0 and notice the memory usage of the IE in Windows TaskMananger.you can click the navgatgion to each sub forum or to each title. the memory usage will increase all the time during your operations but never go down. you can easily make the memory usage up to 100mb in less five minutes and it will never goes down.
and you can take "SourceForge" (http://sourceforge.net/projects/zk1/forums/) as another example. you open sourceForge in IE6.0 and notice the memory usage. it will increase but not so fast as ZUL pages. and the memory usage for sourceForge pages will raise and then stop at some level(almost 40mb).but for Zul Pages,memory usage will increase all the time.
Do you understand what I mean now?
In my project, the complex zul pages cost a lot of memory, but it is ok when user begin to operate my zul pages.but after user does some operations, the memory usage increases so fast and never stop, IE becomes slower and slower in very short time. I just want my zul pages didn't increase memory all the time. Like the SourceForge example, it should raise and stop at some levels.
this only happened on IE, but my customers are almost IE, so I need to made it fit for IE.
I made some tests according to the Windows Task Manager datas.

Memory_usage // first_access // endless_random_click_after_about_3 minutes
zk_Forum_pages // 41,332k // 107,331k
(www.zkoss.org/forum/index.zul)
sourceForge_Pages // 32,173k // 41,937k
(sourceforge.net/projects/zk1/forums/)
my_project // 68,213k // 332,133k


Do you understand what I mean now?
is there anything I can do?
Any suggestions or help will be fully thankful. As my customers are almost using IE so I need to make my project fit for IE.Now I am trying to resign my zul pages to make it as clean and simple as possiable. but if zul pages increase memory usage all the time, no IE user can view zul pages in a long time. you know what I mean? this never happened before? if you access zk Forum or ZK demo in IE, it should be known long time before.

link publish delete flag offensive edit

answered 2009-09-16 10:16:20 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

updated 2009-09-16 10:19:05 +0800

@cryandaguo

I know what's you means now, but it's not a appropriate example about ZK Forum & SourceForge.
ZK Forum is Ajax based and SourceForge is page based, the memory issue is because of Ajax,
all of the Ajax based Web site has the some problem in IE6, that's a bug that still need to fixed.
This issue will never happened in a normal page based website, because they don't need to communicate
to a Ajax Engine frequently.

We had discuss this subject for a long time and still keep watching any function could solve this issue.
Please go to SourceForge-ZK-Tracker-Bug to view our discussion. And welcome to give us more ideas
& suggests.

/Joy

link publish delete flag offensive edit

answered 2009-09-17 15:06:16 +0800

cryandaguo gravatar image cryandaguo
72 2

updated 2009-09-17 15:08:32 +0800

Joy:
I tried to google a lot and now I understand.
thanks very much Joy
Now It seems I can not use ZK framework in my project anymore.
I liked to use ZK so much that I really want to introduce zk into my real work.
the almost 400mb memory usage after about 5 minutes operations really crashed everything.
I planed to try to use url to navigation most zul pages not to use createComponents()method. and try to simplefy my complex zul pages to see what happens.
Do you have any good suggestions to my issues?
I really dont what to give up zk!

link publish delete flag offensive edit

answered 2009-09-18 01:11:22 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

@cryandaguo

hmmm...if you have to use a lot of Ajax in your project, that will definity hard to avoid this problem,
but there still have some ways to avoid it, just like to find a timing to reload the page (or redirect
to another page), they can release the caching memory. But you should find a way to save the
temporary data, like to use a Queue or anywhere which is upper than Request Scrope.

Regards
/Joy

link publish delete flag offensive edit

answered 2009-10-19 11:01:35 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

@cryandaguo,

Did you try the latest ZK 3.6.3 Freshly version, which was fixed some memory leak in IE?
Please see the bugs tracker this and this

/Jumper

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: 2009-09-14 05:29:26 +0800

Seen: 516 times

Last updated: Oct 19 '09

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