[Pkg-javascript-commits] [dojo] 17/27: Remove dumb speed test that compares against an old API we will never restore
David Prévot
taffit at moszumanska.debian.org
Sun Sep 14 16:23:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.7.6
in repository dojo.
commit 1ae57b195d690e9b3daa84ea85d9117c94f646b9
Author: Colin Snover <github.com at zetafleet.com>
Date: Fri Nov 29 21:13:56 2013 +0000
Remove dumb speed test that compares against an old API we will never restore
Fixes #11200
(cherry picked from commit a3dd7a47aa01315e601525b0d8217a8408237149)
(cherry picked from commit d7ec9bb2e84a0880e831b5c120214011cdcd9097)
---
tests/_base/html_docScroll.html | 38 --------------------------------------
1 file changed, 38 deletions(-)
diff --git a/tests/_base/html_docScroll.html b/tests/_base/html_docScroll.html
index effc2fe..921a232 100644
--- a/tests/_base/html_docScroll.html
+++ b/tests/_base/html_docScroll.html
@@ -38,44 +38,6 @@
var s = dojo.withGlobal(win, "_docScroll", dojo);
t.is(10, s.x);
t.is(20, s.y);
- },
-
- function testSpeed(t){
- var old_docScroll = function(){
- var
- _b = dojo.body(),
- _w = dojo.global,
- de = dojo.doc.documentElement;
- return {
- y: (_w.pageYOffset || de.scrollTop || _b.scrollTop || 0),
- x: (_w.pageXOffset || dojo._fixIeBiDiScrollLeft(de.scrollLeft) || _b.scrollLeft || 0)
- };
- };
- var count = 10000; // initial guess
- var new_docScroll = dojo._docScroll;
- var t0 = new Date().getTime();
- for (var i=0; i < count; i++){
- var j = new_docScroll();
- }
- t0 = new Date().getTime() - t0;
- // modify guess to get about 1 second of CPU crunching
- if(t0 < 50){ // crazy short time
- count *= 25;
- }else{
- count = Math.ceil(10000000/t0);
- }
- t0 = new Date().getTime();
- for (i=0; i < count; i++){
- j = new_docScroll();
- }
- t0 = new Date().getTime() - t0;
- var t1 = new Date().getTime();
- for (var i=0; i < count; i++){
- j = old_docScroll();
- }
- t1 = new Date().getTime() - t1;
- console.log(Math.floor(100*(t1-t0)/t1)+"% speed improvement");
- t.is(true, t1 > t0);
}
]
);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list