[ 
https://issues.apache.org/jira/browse/WICKET-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606423#action_12606423
 ] 

Matej Knopp commented on WICKET-1707:
-------------------------------------

I'm affraid there is not much room for performance improvements in the 
replaceOuterHTML method. Anyway, the method is regularly used to replace big 
chunks of html and I have never encountered any significant performance issue 
with it. Can you try replacing entire table (not just tbody)? That *might* be 
cause of the problems.

> Wicket.replaceOuterHtmlIE() (wicket-ajax.js) has very low performance.
> ----------------------------------------------------------------------
>
>                 Key: WICKET-1707
>                 URL: https://issues.apache.org/jira/browse/WICKET-1707
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>         Environment: IE 7.0
>            Reporter: Bartosz Owczarek
>            Assignee: Matej Knopp
>
> Hi.
> Firstly I'd like to say that I'm using wicket framework in my company in 
> 'e-commerce' system for Business Users. Its main functionality is ordering 
> items available in stores by business users. Items are displayed in a 
> customized table (we're using DataView component for it). This table is a 
> little bit complicated from DOM point of view. Some columns contain images, 
> input components, and different css styles for each row or even column (that 
> are added dynamically in javacode using AttributeModifier). There's about 22 
> columns in table.
> Moreover table is paginable and number of items per page can be change by 
> filter on the web page (default is 50). Paging table is done by our 
> customized paging navigator that uses AjaxEventBeahvior. In other words table 
> is refreshed using build-in ajax provided with wicket. Whati is more only 
> <tbody> tag with its content is refreshed by ajax request (not whole <table>).
> After implementation I've done some testing so here are results...
> Table is refreshed very quickly in FireFox 3 by wicket-ajax.js after 
> receiving response but there is a huge performance bottleneck with refreshing 
> it in IE 7.0.I profiled whole wicket-ajax.js in order to find this 
> bottleneck. It appears that replacing outer html in IE takes about 4 seconds 
> (druing which IE freezes). It's not acceptable. I found that 
> Wicket.replaceOuterHtmlIE() method takes around 3.7seconds! That's when only 
> 50 items in table are displayed!. If we change items per page to greater 
> number then it takes much more time. When I commented body of this function, 
> IE doesn't freeze and performance is very good, but content that comes with 
> ajax response is not refreshed in browser, which is obvious. 
> Then I tried to use jQuery(..).replaceWith() function in 
> Wicket.replaceOuterHtmlIE() whereas rest of its body was commented. It is 
> faster than default Wicket.replaceOuterHtmlIE() implementation. It takes 
> about 1.7 second to render response in browser but of course it doesn't do 
> all things as default Wicket.replaceOuterHtmlIE() implementation does (i.e. 
> default implementation runs embedded javascripts in <script> tags etc.).
> So there is a question...
> Is it possible to improve wciket-ajax.js to get better performance with 
> replacing html in ajax request in IE or have you any idea how to improve 
> speed in replacing html of such table content in IE ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to