You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Damien Hollis (JIRA)" <ji...@apache.org> on 2013/05/02 03:57:13 UTC
[jira] [Commented] (WICKET-5132) Evaluation of returned data (which
includes alot of javascript) very slow after ajax call in IE10.
[ https://issues.apache.org/jira/browse/WICKET-5132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13647185#comment-13647185 ]
Damien Hollis commented on WICKET-5132:
---------------------------------------
Martin,
This change seems to be causing us problems. When we open a popup, we get the following error:
ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: SyntaxError: Unexpected end of input, text: (function(){var e = Wicket.$('ok198--ajax-indicator'); if (e != null && typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);})();(function(){var e = Wicket.$('cancel199--ajax-indicator'); if (e != null && typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);})();(function(){
When I debug the javascript code I see that the result of evaluating node.firstChild.nodeValue is
"(function(){var e = Wicket.$('ok198--ajax-indicator'); if (e != null && typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);})();(function(){var e = Wicket.$('cancel199--ajax-indicator'); if (e != null && typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);})();(function(){"
but evaluating jQuery(node).text() provides the expected javascript:
"(function(){var e = Wicket.$('ok198--ajax-indicator'); if (e != null && typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);})();(function(){var e = Wicket.$('cancel199--ajax-indicator'); if (e != null && typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);})();(function(){var e = Wicket.$('link19a--ajax-indicator'); if (e != null && typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);})();(function(){var e = Wicket.$('link19b--ajax-indicator'); if (e != null && typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);})();"
So it seems that the two approaches do not produce the same result.
I'm testing on Chrome but our users are reporting problems on a variety of browsers.
Can this change be reverted?
> Evaluation of returned data (which includes alot of javascript) very slow after ajax call in IE10.
> --------------------------------------------------------------------------------------------------
>
> Key: WICKET-5132
> URL: https://issues.apache.org/jira/browse/WICKET-5132
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0
> Environment: IE10
> Reporter: Bas Veenema
> Assignee: Martin Grigorov
> Labels: javascript, performance
> Fix For: 6.7.0
>
> Attachments: response_script.txt
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> We're using ajax to update a treetable. In IE10, when the ajax call returns the data, which contains alot of javascript code, processEvaluation in wicket-ajax-jquery.js stalls on var text = jQuery(node).text();
> In jQuery procedure Sizzle.getText is called, which eventually returns property elem.textContent. In IE10 this last statement takes about 26 seconds for our case while the same statement in chrome takes about 6 ms.
> It seems strange that IE10 takes this long to return the textContent of a node, but why is this necessary in the first place?
> The purpose of var text = jQuery(node).text() would be to get the text of the node. I think it would suffice to state var text = node.childNodes[0].nodeValue instead of var text = Query(node).text(), because the text is in the node itself, and it's not necessary to get the text from its descendants, because it has no descendants.
> In our case this modification improves the duration from 25915 ms to 8 ms in IE10.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira