| Current Path : /var/www/html/mmishra/mybp1/js/tinymce/tests/ |
| Current File : /var/www/html/mmishra/mybp1/js/tinymce/tests/performance.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Performance testcase</title>
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<link rel="stylesheet" href="css/unit.css">
<style>
a {display: block}
</style>
<script type="text/javascript">
function getTime() {
return new Date().getTime();
}
function runCleanupTests(id) {
var ti, h, i, ed = tinyMCE.get(id);
ti = getTime();
for (i=0; i<10; i++)
ed.getContent();
console.log('editor.getContent: ' + (getTime() - ti));
}
function runStyleParser() {
var ti, i, o;
ti = getTime();
for (i=0; i<1000; i++) {
o = tinymce.DOM.parseStyle('border:1px solid red; background-image:url(some/dir/file.gif); font-size: 15px; color:rgb(1,2,3)');
tinymce.DOM.serializeStyle(o);
}
console.log('DOMUtils.parseStyle/DOMUtils.serializeStyle ' + (getTime() - ti));
}
function runURI() {
var ti, i, u;
ti = getTime();
for (i=0; i<1000; i++) {
new tinymce.util.URI('http://www.site.com/dir1/dir2/file.html').toRelative('http://www.site.com/dir1/dir3/file.html');
new tinymce.util.URI('http://www.site.com/dir1/dir2/file.html').toRelative('http://www.site.com/dir3/dir4/file.html');
new tinymce.util.URI('http://www.site.com/dir1/dir2/').toAbsolute('../dir3');
new tinymce.util.URI('http://www.site.com/dir1/dir2/').toAbsolute('../dir3', 1);
}
console.log('tinymce.util.URI: ' + (getTime() - ti));
}
function trim() {
var ti, i, u, data1 = '', data2 = '';
for (i=0; i<100; i++) {
data1 += ' abcabcabcabcabcabcabcabcabcabc ';
data2 += 'abcabcabcabcabcabcabcabcabcabc';
}
ti = getTime();
for (i=0; i<1000; i++) {
tinymce.trim(data1);
tinymce.trim(data2);
}
console.log('tinymce.trim: ' + (getTime() - ti));
}
function runCleanupTestsNoPlugins() {
tinyMCE.init({
mode : "exact",
elements : "elm1",
theme : "advanced",
add_unload_trigger : false,
setup : function(ed) {
ed.onInit.add(function() {
var ti, h, i;
ti = getTime();
for (i=0; i<10; i++)
ed.getContent();
console.log('editor.getContent: ' + (getTime() - ti));
});
}
});
}
function runCleanupTestsAllPlugins() {
tinyMCE.init({
mode : "exact",
elements : "elm2",
theme : "advanced",
add_unload_trigger : false,
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
setup : function(ed) {
ed.onInit.add(function() {
var ti, h, i;
ti = getTime();
for (i=0; i<10; i++)
ed.getContent();
console.log('editor.getContent: ' + (getTime() - ti));
});
}
});
}
</script>
</head>
<body>
<h1>Performance tests</h1>
<div>
<a href="javascript:runCleanupTestsNoPlugins();">[cleanup/serializer no plugins]</a>
<a href="javascript:runCleanupTestsAllPlugins();">[cleanup/serializer all plugins]</a>
<a href="javascript:runStyleParser();">[tinymce.dom.DOMUtils.parseStyle/tinymce.dom.DOMUtils.serializeStyle]</a>
<a href="javascript:runURI();">[tinymce.utils.URI]</a>
<a href="javascript:trim();">[tinymce.trim]</a>
</div>
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
<h3>Basic text area</h3>
<textarea id="elm1" name="elm1">
<h2> Compatibility Chart </h2><p>TinyMCE uses advanced JavaScript and tries to be as smart as possible when it comes to different browsers, the main focus is on Microsoft Internet Explorer and Mozilla/Firefox. The table was reset to only show the browsers we ourselves can test on. It works with many older versions of Mozilla and Firefox. If a browser is not listed on this page, that doesn't mean TinyMCE won't work. To determine compatibility with an unlisted browser, try out the examples on our website.</p><p>Since MacOS X 10.4 is more or less Linux (well, BSD) we are not testing much on Linux any more, use the Sourceforge bug report system to submit bugs on the very latest browsers only.</p><p>As of 2.0.8 of TinyMCE we decided to not support MSIE 5.0 any more, there are major flaws in MSIE 5.0 and it is not practical to support this any more. This also marks the release of MSIE 7.0 and Firefox 2.0.</p><table style="text-align: center; border: 1px solid #CCC; border-collapse: collapse; margin: 0.3em; padding: 0.3em; empty-cells: show;"><tr style="font-weight: bold; margin-bottom: 0.3em;"><th style="background: #CCC !important;"> </th><th> Windows XP </th><th> Mac OS X </th><th> GNU/Linux</th></tr><tr><th> IE 7</th><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A </td><td style="color: #BBB;"> N/A</td></tr><tr><th> IE 6</th><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A </td><td style="color: #BBB;"> N/A</td></tr><tr><th> IE 5.5 SP2</th><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A </td><td style="color: #BBB;"> N/A</td></tr><tr><th> IE 5.0</th><td style="color: #C22;"> No </td><td style="color: #C22;"> No </td><td style="color: #BBB;"> N/A</td></tr><tr><th> SeaMonkey 1.0.5</th><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A</td></tr><tr><th> Firefox 1.5.x</th><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK</td></tr><tr><th> Firefox 2.0</th><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK</td></tr><tr><th> Firefox 3.0b1</th><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK</td></tr><tr><th> Camino</th><td style="color: #BBB;"> N/A </td><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A</td></tr><tr><th> Safari 2.x</th><td style="color: #BBB;"> N/A </td><td style="color: #7A6424;"> OK<sup style="color: #222;">[1]</sup> </td><td style="color: #BBB;"> N/A</td></tr><tr><th> Safari 3.x</th><td style="color: #7A6424;"> OK<sup style="color: #7A6424;">[3]</sup> </td><td style="color: #7A6424;"> OK<sup style="color: #7A6424;">[3]</sup> </td><td style="color: #BBB;"> N/A</td></tr><tr><th> Opera 9</th><td style="color: #7A6424;"> OK<sup style="color: #222;">[2]</sup> </td><td style="color: #7A6424;"> OK<sup style="color: #222;">[2]</sup> </td><td style="color: #7A6424;"> OK<sup style="color: #222;">[2]</sup></td></tr><tr><th> Maxthon2</th><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A </td><td style="color: #BBB;"> N/A</td></tr><tr><th> Konqueror</th><td style="color: #BBB;"> N/A </td><td style="color: #BBB;"> N/A </td><td style="color: #C22;"> No</td></tr></table><ol> <li>Latest nightly build of <a href="http://webkit.org/" class="external text" title="http://webkit.org/" rel="nofollow">WebKit</a> works “OK”. You can disable TinyMCE for this browser by using the <a href="/index.php/TinyMCE:Configuration/browsers" title="TinyMCE:Configuration/browsers">browsers</a> setting.</li> <li>Partially working.</li> <li>Partially working on the latest official version 3.0.4 and with the 3.x branch of TinyMCE.</li></ol>
<p><a href="test.htm"></a><a href="test/test/test.htm">test</a><a href="../../test/test/test.htm">test</a><a href="http://www.site.com/test/test/test.htm">test</a></p>
<p><a href="test.htm"></a><a href="test/test/test.htm">test</a><a href="../../test/test/test.htm">test</a><a href="http://www.site.com/test/test/test.htm">test</a></p>
<p><a href="test.htm"></a><a href="test/test/test.htm">test</a><a href="../../test/test/test.htm">test</a><a href="http://www.site.com/test/test/test.htm">test</a></p>
<p><a href="test.htm"></a><a href="test/test/test.htm">test</a><a href="../../test/test/test.htm">test</a><a href="http://www.site.com/test/test/test.htm">test</a></p>
</textarea>
<div>
</div>
<h3>All plugins enabled</h3>
<textarea id="elm2" name="elm2">
<h2> Compatibility Chart </h2><p>TinyMCE uses advanced JavaScript and tries to be as smart as possible when it comes to different browsers, the main focus is on Microsoft Internet Explorer and Mozilla/Firefox. The table was reset to only show the browsers we ourselves can test on. It works with many older versions of Mozilla and Firefox. If a browser is not listed on this page, that doesn't mean TinyMCE won't work. To determine compatibility with an unlisted browser, try out the examples on our website.</p><p>Since MacOS X 10.4 is more or less Linux (well, BSD) we are not testing much on Linux any more, use the Sourceforge bug report system to submit bugs on the very latest browsers only.</p><p>As of 2.0.8 of TinyMCE we decided to not support MSIE 5.0 any more, there are major flaws in MSIE 5.0 and it is not practical to support this any more. This also marks the release of MSIE 7.0 and Firefox 2.0.</p><table style="text-align: center; border: 1px solid #CCC; border-collapse: collapse; margin: 0.3em; padding: 0.3em; empty-cells: show;"><tr style="font-weight: bold; margin-bottom: 0.3em;"><th style="background: #CCC !important;"> </th><th> Windows XP </th><th> Mac OS X </th><th> GNU/Linux</th></tr><tr><th> IE 7</th><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A </td><td style="color: #BBB;"> N/A</td></tr><tr><th> IE 6</th><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A </td><td style="color: #BBB;"> N/A</td></tr><tr><th> IE 5.5 SP2</th><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A </td><td style="color: #BBB;"> N/A</td></tr><tr><th> IE 5.0</th><td style="color: #C22;"> No </td><td style="color: #C22;"> No </td><td style="color: #BBB;"> N/A</td></tr><tr><th> SeaMonkey 1.0.5</th><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A</td></tr><tr><th> Firefox 1.5.x</th><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK</td></tr><tr><th> Firefox 2.0</th><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK</td></tr><tr><th> Firefox 3.0b1</th><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK </td><td style="color: #166423;"> OK</td></tr><tr><th> Camino</th><td style="color: #BBB;"> N/A </td><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A</td></tr><tr><th> Safari 2.x</th><td style="color: #BBB;"> N/A </td><td style="color: #7A6424;"> OK<sup style="color: #222;">[1]</sup> </td><td style="color: #BBB;"> N/A</td></tr><tr><th> Safari 3.x</th><td style="color: #7A6424;"> OK<sup style="color: #7A6424;">[3]</sup> </td><td style="color: #7A6424;"> OK<sup style="color: #7A6424;">[3]</sup> </td><td style="color: #BBB;"> N/A</td></tr><tr><th> Opera 9</th><td style="color: #7A6424;"> OK<sup style="color: #222;">[2]</sup> </td><td style="color: #7A6424;"> OK<sup style="color: #222;">[2]</sup> </td><td style="color: #7A6424;"> OK<sup style="color: #222;">[2]</sup></td></tr><tr><th> Maxthon2</th><td style="color: #166423;"> OK </td><td style="color: #BBB;"> N/A </td><td style="color: #BBB;"> N/A</td></tr><tr><th> Konqueror</th><td style="color: #BBB;"> N/A </td><td style="color: #BBB;"> N/A </td><td style="color: #C22;"> No</td></tr></table><ol> <li>Latest nightly build of <a href="http://webkit.org/" class="external text" title="http://webkit.org/" rel="nofollow">WebKit</a> works “OK”. You can disable TinyMCE for this browser by using the <a href="/index.php/TinyMCE:Configuration/browsers" title="TinyMCE:Configuration/browsers">browsers</a> setting.</li> <li>Partially working.</li> <li>Partially working on the latest official version 3.0.4 and with the 3.x branch of TinyMCE.</li></ol>
<p><a href="test.htm"></a><a href="test/test/test.htm">test</a><a href="../../test/test/test.htm">test</a><a href="http://www.site.com/test/test/test.htm">test</a></p>
<p><a href="test.htm"></a><a href="test/test/test.htm">test</a><a href="../../test/test/test.htm">test</a><a href="http://www.site.com/test/test/test.htm">test</a></p>
<p><a href="test.htm"></a><a href="test/test/test.htm">test</a><a href="../../test/test/test.htm">test</a><a href="http://www.site.com/test/test/test.htm">test</a></p>
<p><a href="test.htm"></a><a href="test/test/test.htm">test</a><a href="../../test/test/test.htm">test</a><a href="http://www.site.com/test/test/test.htm">test</a></p>
</textarea>
<div>
</div>
</form>
</body>
</html>